From d64bf89af1f6904fc7e9acd7167bda897be399d0 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Fri, 2 Oct 2020 14:01:27 +0200 Subject: [PATCH] - RM Vendor - Update .gitignore --- .gitignore | 1 + vendor/autoload.php | 7 - vendor/composer/ClassLoader.php | 445 ------------------ vendor/composer/LICENSE | 21 - vendor/composer/autoload_classmap.php | 9 - vendor/composer/autoload_files.php | 10 - vendor/composer/autoload_namespaces.php | 9 - vendor/composer/autoload_psr4.php | 12 - vendor/composer/autoload_real.php | 70 --- vendor/composer/autoload_static.php | 51 -- vendor/composer/installed.json | 189 -------- vendor/phpoption/phpoption/LICENSE | 201 -------- vendor/phpoption/phpoption/composer.json | 42 -- .../phpoption/src/PhpOption/LazyOption.php | 169 ------- .../phpoption/src/PhpOption/None.php | 136 ------ .../phpoption/src/PhpOption/Option.php | 434 ----------------- .../phpoption/src/PhpOption/Some.php | 165 ------- vendor/symfony/polyfill-ctype/Ctype.php | 227 --------- vendor/symfony/polyfill-ctype/LICENSE | 19 - vendor/symfony/polyfill-ctype/README.md | 12 - vendor/symfony/polyfill-ctype/bootstrap.php | 46 -- vendor/symfony/polyfill-ctype/composer.json | 38 -- vendor/vlucas/phpdotenv/LICENSE | 30 -- vendor/vlucas/phpdotenv/Makefile | 23 - vendor/vlucas/phpdotenv/composer.json | 51 -- vendor/vlucas/phpdotenv/phpstan.src.neon.dist | 10 - vendor/vlucas/phpdotenv/src/Dotenv.php | 157 ------ .../src/Exception/ExceptionInterface.php | 8 - .../src/Exception/InvalidFileException.php | 10 - .../src/Exception/InvalidPathException.php | 10 - .../src/Exception/ValidationException.php | 10 - vendor/vlucas/phpdotenv/src/Loader/Lines.php | 135 ------ vendor/vlucas/phpdotenv/src/Loader/Loader.php | 122 ----- .../phpdotenv/src/Loader/LoaderInterface.php | 20 - vendor/vlucas/phpdotenv/src/Loader/Parser.php | 241 ---------- vendor/vlucas/phpdotenv/src/Loader/Value.php | 83 ---- vendor/vlucas/phpdotenv/src/Regex/Regex.php | 125 ----- .../src/Repository/AbstractRepository.php | 175 ------- .../src/Repository/Adapter/ApacheAdapter.php | 64 --- .../src/Repository/Adapter/ArrayAdapter.php | 67 --- .../Adapter/AvailabilityInterface.php | 13 - .../Repository/Adapter/EnvConstAdapter.php | 60 --- .../src/Repository/Adapter/PutenvAdapter.php | 56 --- .../Repository/Adapter/ReaderInterface.php | 15 - .../Repository/Adapter/ServerConstAdapter.php | 60 --- .../Repository/Adapter/WriterInterface.php | 25 - .../src/Repository/AdapterRepository.php | 86 ---- .../src/Repository/RepositoryBuilder.php | 144 ------ .../src/Repository/RepositoryInterface.php | 54 --- vendor/vlucas/phpdotenv/src/Result/Error.php | 93 ---- vendor/vlucas/phpdotenv/src/Result/Result.php | 70 --- .../vlucas/phpdotenv/src/Result/Success.php | 93 ---- .../vlucas/phpdotenv/src/Store/File/Paths.php | 27 -- .../phpdotenv/src/Store/File/Reader.php | 52 -- .../vlucas/phpdotenv/src/Store/FileStore.php | 61 --- .../phpdotenv/src/Store/StoreBuilder.php | 102 ---- .../phpdotenv/src/Store/StoreInterface.php | 15 - vendor/vlucas/phpdotenv/src/Validator.php | 193 -------- 58 files changed, 1 insertion(+), 4872 deletions(-) delete mode 100644 vendor/autoload.php delete mode 100644 vendor/composer/ClassLoader.php delete mode 100644 vendor/composer/LICENSE delete mode 100644 vendor/composer/autoload_classmap.php delete mode 100644 vendor/composer/autoload_files.php delete mode 100644 vendor/composer/autoload_namespaces.php delete mode 100644 vendor/composer/autoload_psr4.php delete mode 100644 vendor/composer/autoload_real.php delete mode 100644 vendor/composer/autoload_static.php delete mode 100644 vendor/composer/installed.json delete mode 100644 vendor/phpoption/phpoption/LICENSE delete mode 100644 vendor/phpoption/phpoption/composer.json delete mode 100644 vendor/phpoption/phpoption/src/PhpOption/LazyOption.php delete mode 100644 vendor/phpoption/phpoption/src/PhpOption/None.php delete mode 100644 vendor/phpoption/phpoption/src/PhpOption/Option.php delete mode 100644 vendor/phpoption/phpoption/src/PhpOption/Some.php delete mode 100644 vendor/symfony/polyfill-ctype/Ctype.php delete mode 100644 vendor/symfony/polyfill-ctype/LICENSE delete mode 100644 vendor/symfony/polyfill-ctype/README.md delete mode 100644 vendor/symfony/polyfill-ctype/bootstrap.php delete mode 100644 vendor/symfony/polyfill-ctype/composer.json delete mode 100644 vendor/vlucas/phpdotenv/LICENSE delete mode 100644 vendor/vlucas/phpdotenv/Makefile delete mode 100644 vendor/vlucas/phpdotenv/composer.json delete mode 100644 vendor/vlucas/phpdotenv/phpstan.src.neon.dist delete mode 100644 vendor/vlucas/phpdotenv/src/Dotenv.php delete mode 100644 vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php delete mode 100644 vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php delete mode 100644 vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php delete mode 100644 vendor/vlucas/phpdotenv/src/Exception/ValidationException.php delete mode 100644 vendor/vlucas/phpdotenv/src/Loader/Lines.php delete mode 100644 vendor/vlucas/phpdotenv/src/Loader/Loader.php delete mode 100644 vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php delete mode 100644 vendor/vlucas/phpdotenv/src/Loader/Parser.php delete mode 100644 vendor/vlucas/phpdotenv/src/Loader/Value.php delete mode 100644 vendor/vlucas/phpdotenv/src/Regex/Regex.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/AvailabilityInterface.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php delete mode 100644 vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php delete mode 100644 vendor/vlucas/phpdotenv/src/Result/Error.php delete mode 100644 vendor/vlucas/phpdotenv/src/Result/Result.php delete mode 100644 vendor/vlucas/phpdotenv/src/Result/Success.php delete mode 100644 vendor/vlucas/phpdotenv/src/Store/File/Paths.php delete mode 100644 vendor/vlucas/phpdotenv/src/Store/File/Reader.php delete mode 100644 vendor/vlucas/phpdotenv/src/Store/FileStore.php delete mode 100644 vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php delete mode 100644 vendor/vlucas/phpdotenv/src/Store/StoreInterface.php delete mode 100644 vendor/vlucas/phpdotenv/src/Validator.php diff --git a/.gitignore b/.gitignore index d021435..60d12cb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ composer.lock package-lock.json .env +vendor/ # ignore log file debug.log diff --git a/vendor/autoload.php b/vendor/autoload.php deleted file mode 100644 index 7e1214c..0000000 --- a/vendor/autoload.php +++ /dev/null @@ -1,7 +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 http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - 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 array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - 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 array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - 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 array|string $paths The PSR-0 base directories - */ - 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 array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - 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 - */ - 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 - */ - 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 - */ - 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 - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * 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; - } - - 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. - */ -function includeFile($file) -{ - include $file; -} 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 7a91153..0000000 --- a/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', -); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php deleted file mode 100644 index b7fc012..0000000 --- a/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/symfony/polyfill-ctype'), - 'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'), - 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), -); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php deleted file mode 100644 index 3970b7a..0000000 --- a/vendor/composer/autoload_real.php +++ /dev/null @@ -1,70 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit5c82eead29a7c0aba5fb1658da555b7f::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit5c82eead29a7c0aba5fb1658da555b7f::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire5c82eead29a7c0aba5fb1658da555b7f($fileIdentifier, $file); - } - - return $loader; - } -} - -function composerRequire5c82eead29a7c0aba5fb1658da555b7f($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php deleted file mode 100644 index 2df03ed..0000000 --- a/vendor/composer/autoload_static.php +++ /dev/null @@ -1,51 +0,0 @@ - __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'S' => - array ( - 'Symfony\\Polyfill\\Ctype\\' => 23, - ), - 'P' => - array ( - 'PhpOption\\' => 10, - ), - 'D' => - array ( - 'Dotenv\\' => 7, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Symfony\\Polyfill\\Ctype\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', - ), - 'PhpOption\\' => - array ( - 0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption', - ), - 'Dotenv\\' => - array ( - 0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src', - ), - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit5c82eead29a7c0aba5fb1658da555b7f::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit5c82eead29a7c0aba5fb1658da555b7f::$prefixDirsPsr4; - - }, null, ClassLoader::class); - } -} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index 23271aa..0000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "name": "phpoption/phpoption", - "version": "1.7.4", - "version_normalized": "1.7.4.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" - }, - "time": "2020-06-07T10:40:07+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ] - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.18.0", - "version_normalized": "1.18.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "time": "2020-07-14T12:35:20+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ] - }, - { - "name": "vlucas/phpdotenv", - "version": "v4.1.8", - "version_normalized": "4.1.8.0", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/572af79d913627a9d70374d27a6f5d689a35de32", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." - }, - "time": "2020-07-14T19:22:52+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ] - } -] diff --git a/vendor/phpoption/phpoption/LICENSE b/vendor/phpoption/phpoption/LICENSE deleted file mode 100644 index f49a4e1..0000000 --- a/vendor/phpoption/phpoption/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/vendor/phpoption/phpoption/composer.json b/vendor/phpoption/phpoption/composer.json deleted file mode 100644 index 1530967..0000000 --- a/vendor/phpoption/phpoption/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "phpoption/phpoption", - "description": "Option Type for PHP", - "keywords": ["php", "option", "language", "type"], - "license": "Apache-2.0", - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com" - } - ], - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0", - "bamarni/composer-bin-plugin": "^1.3" - }, - "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" - } - }, - "autoload-dev": { - "psr-4": { - "PhpOption\\Tests\\": "tests/PhpOption/Tests/" - } - }, - "config": { - "preferred-install": "dist", - "platform-check": false - }, - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - } -} diff --git a/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php b/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php deleted file mode 100644 index e192b11..0000000 --- a/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace PhpOption; - -/** - * @template T - * - * @extends Option - */ -final class LazyOption extends Option -{ - /** @var callable(mixed...):(Option) */ - private $callback; - - /** @var array */ - private $arguments; - - /** @var Option|null */ - private $option; - - /** - * @template S - * @param callable(mixed...):(Option) $callback - * @param array $arguments - * - * @return LazyOption - */ - public static function create($callback, array $arguments = []) - { - return new self($callback, $arguments); - } - - /** - * @param callable(mixed...):(Option) $callback - * @param array $arguments - */ - public function __construct($callback, array $arguments = []) - { - if (!is_callable($callback)) { - throw new \InvalidArgumentException('Invalid callback given'); - } - - $this->callback = $callback; - $this->arguments = $arguments; - } - - public function isDefined() - { - return $this->option()->isDefined(); - } - - public function isEmpty() - { - return $this->option()->isEmpty(); - } - - public function get() - { - return $this->option()->get(); - } - - public function getOrElse($default) - { - return $this->option()->getOrElse($default); - } - - public function getOrCall($callable) - { - return $this->option()->getOrCall($callable); - } - - public function getOrThrow(\Exception $ex) - { - return $this->option()->getOrThrow($ex); - } - - public function orElse(Option $else) - { - return $this->option()->orElse($else); - } - - public function ifDefined($callable) - { - $this->option()->ifDefined($callable); - } - - public function forAll($callable) - { - return $this->option()->forAll($callable); - } - - public function map($callable) - { - return $this->option()->map($callable); - } - - public function flatMap($callable) - { - return $this->option()->flatMap($callable); - } - - public function filter($callable) - { - return $this->option()->filter($callable); - } - - public function filterNot($callable) - { - return $this->option()->filterNot($callable); - } - - public function select($value) - { - return $this->option()->select($value); - } - - public function reject($value) - { - return $this->option()->reject($value); - } - - public function getIterator() - { - return $this->option()->getIterator(); - } - - public function foldLeft($initialValue, $callable) - { - return $this->option()->foldLeft($initialValue, $callable); - } - - public function foldRight($initialValue, $callable) - { - return $this->option()->foldRight($initialValue, $callable); - } - - /** - * @return Option - */ - private function option() - { - if (null === $this->option) { - $this->option = call_user_func_array($this->callback, $this->arguments); - if (!$this->option instanceof Option) { - $this->option = null; - - throw new \RuntimeException(sprintf('Expected instance of \%s', Option::class)); - } - } - - return $this->option; - } -} diff --git a/vendor/phpoption/phpoption/src/PhpOption/None.php b/vendor/phpoption/phpoption/src/PhpOption/None.php deleted file mode 100644 index 13b2b4e..0000000 --- a/vendor/phpoption/phpoption/src/PhpOption/None.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace PhpOption; - -use EmptyIterator; - -/** - * @extends Option - */ -final class None extends Option -{ - /** @var None|null */ - private static $instance; - - /** - * @return None - */ - public static function create() - { - if (null === self::$instance) { - self::$instance = new self(); - } - - return self::$instance; - } - - public function get() - { - throw new \RuntimeException('None has no value.'); - } - - public function getOrCall($callable) - { - return $callable(); - } - - public function getOrElse($default) - { - return $default; - } - - public function getOrThrow(\Exception $ex) - { - throw $ex; - } - - public function isEmpty() - { - return true; - } - - public function isDefined() - { - return false; - } - - public function orElse(Option $else) - { - return $else; - } - - public function ifDefined($callable) - { - // Just do nothing in that case. - } - - public function forAll($callable) - { - return $this; - } - - public function map($callable) - { - return $this; - } - - public function flatMap($callable) - { - return $this; - } - - public function filter($callable) - { - return $this; - } - - public function filterNot($callable) - { - return $this; - } - - public function select($value) - { - return $this; - } - - public function reject($value) - { - return $this; - } - - public function getIterator() - { - return new EmptyIterator(); - } - - public function foldLeft($initialValue, $callable) - { - return $initialValue; - } - - public function foldRight($initialValue, $callable) - { - return $initialValue; - } - - private function __construct() - { - } -} diff --git a/vendor/phpoption/phpoption/src/PhpOption/Option.php b/vendor/phpoption/phpoption/src/PhpOption/Option.php deleted file mode 100644 index c69e43a..0000000 --- a/vendor/phpoption/phpoption/src/PhpOption/Option.php +++ /dev/null @@ -1,434 +0,0 @@ - - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace PhpOption; - -use ArrayAccess; -use IteratorAggregate; - -/** - * @template T - * - * @implements IteratorAggregate - */ -abstract class Option implements IteratorAggregate -{ - /** - * Creates an option given a return value. - * - * This is intended for consuming existing APIs and allows you to easily - * convert them to an option. By default, we treat ``null`` as the None - * case, and everything else as Some. - * - * @template S - * - * @param S $value The actual return value. - * @param S $noneValue The value which should be considered "None"; null by - * default. - * - * @return Option - */ - public static function fromValue($value, $noneValue = null) - { - if ($value === $noneValue) { - return None::create(); - } - - return new Some($value); - } - - /** - * Creates an option from an array's value. - * - * If the key does not exist in the array, the array is not actually an - * array, or the array's value at the given key is null, None is returned. - * Otherwise, Some is returned wrapping the value at the given key. - * - * @template S - * - * @param array|ArrayAccess|null $array A potential array or \ArrayAccess value. - * @param string $key The key to check. - * - * @return Option - */ - public static function fromArraysValue($array, $key) - { - if (!(is_array($array) || $array instanceof ArrayAccess) || !isset($array[$key])) { - return None::create(); - } - - return new Some($array[$key]); - } - - /** - * Creates a lazy-option with the given callback. - * - * This is also a helper constructor for lazy-consuming existing APIs where - * the return value is not yet an option. By default, we treat ``null`` as - * None case, and everything else as Some. - * - * @template S - * - * @param callable $callback The callback to evaluate. - * @param array $arguments The arguments for the callback. - * @param S $noneValue The value which should be considered "None"; - * null by default. - * - * @return LazyOption - */ - public static function fromReturn($callback, array $arguments = [], $noneValue = null) - { - return new LazyOption(static function () use ($callback, $arguments, $noneValue) { - /** @var mixed */ - $return = call_user_func_array($callback, $arguments); - - if ($return === $noneValue) { - return None::create(); - } - - return new Some($return); - }); - } - - /** - * Option factory, which creates new option based on passed value. - * - * If value is already an option, it simply returns. If value is callable, - * LazyOption with passed callback created and returned. If Option - * returned from callback, it returns directly. On other case value passed - * to Option::fromValue() method. - * - * @template S - * - * @param Option|callable|S $value - * @param S $noneValue Used when $value is mixed or - * callable, for None-check. - * - * @return Option|LazyOption - */ - public static function ensure($value, $noneValue = null) - { - if ($value instanceof self) { - return $value; - } elseif (is_callable($value)) { - return new LazyOption(static function () use ($value, $noneValue) { - /** @var mixed */ - $return = $value(); - - if ($return instanceof self) { - return $return; - } else { - return self::fromValue($return, $noneValue); - } - }); - } else { - return self::fromValue($value, $noneValue); - } - } - - /** - * Lift a function so that it accepts Option as parameters. - * - * We return a new closure that wraps the original callback. If any of the - * parameters passed to the lifted function is empty, the function will - * return a value of None. Otherwise, we will pass all parameters to the - * original callback and return the value inside a new Option, unless an - * Option is returned from the function, in which case, we use that. - * - * @template S - * - * @param callable $callback - * @param mixed $noneValue - * - * @return callable - */ - public static function lift($callback, $noneValue = null) - { - return static function () use ($callback, $noneValue) { - /** @var array */ - $args = func_get_args(); - - $reduced_args = array_reduce( - $args, - /** @param bool $status */ - static function ($status, self $o) { - return $o->isEmpty() ? true : $status; - }, - false - ); - // if at least one parameter is empty, return None - if ($reduced_args) { - return None::create(); - } - - $args = array_map( - /** @return T */ - static function (self $o) { - // it is safe to do so because the fold above checked - // that all arguments are of type Some - /** @var T */ - return $o->get(); - }, - $args - ); - - return self::ensure(call_user_func_array($callback, $args), $noneValue); - }; - } - - /** - * Returns the value if available, or throws an exception otherwise. - * - * @throws \RuntimeException If value is not available. - * - * @return T - */ - abstract public function get(); - - /** - * Returns the value if available, or the default value if not. - * - * @template S - * - * @param S $default - * - * @return T|S - */ - abstract public function getOrElse($default); - - /** - * Returns the value if available, or the results of the callable. - * - * This is preferable over ``getOrElse`` if the computation of the default - * value is expensive. - * - * @template S - * - * @param callable():S $callable - * - * @return T|S - */ - abstract public function getOrCall($callable); - - /** - * Returns the value if available, or throws the passed exception. - * - * @param \Exception $ex - * - * @return T - */ - abstract public function getOrThrow(\Exception $ex); - - /** - * Returns true if no value is available, false otherwise. - * - * @return bool - */ - abstract public function isEmpty(); - - /** - * Returns true if a value is available, false otherwise. - * - * @return bool - */ - abstract public function isDefined(); - - /** - * Returns this option if non-empty, or the passed option otherwise. - * - * This can be used to try multiple alternatives, and is especially useful - * with lazy evaluating options: - * - * ```php - * $repo->findSomething() - * ->orElse(new LazyOption(array($repo, 'findSomethingElse'))) - * ->orElse(new LazyOption(array($repo, 'createSomething'))); - * ``` - * - * @param Option $else - * - * @return Option - */ - abstract public function orElse(self $else); - - /** - * This is similar to map() below except that the return value has no meaning; - * the passed callable is simply executed if the option is non-empty, and - * ignored if the option is empty. - * - * In all cases, the return value of the callable is discarded. - * - * ```php - * $comment->getMaybeFile()->ifDefined(function($file) { - * // Do something with $file here. - * }); - * ``` - * - * If you're looking for something like ``ifEmpty``, you can use ``getOrCall`` - * and ``getOrElse`` in these cases. - * - * @deprecated Use forAll() instead. - * - * @param callable(T):mixed $callable - * - * @return void - */ - abstract public function ifDefined($callable); - - /** - * This is similar to map() except that the return value of the callable has no meaning. - * - * The passed callable is simply executed if the option is non-empty, and ignored if the - * option is empty. This method is preferred for callables with side-effects, while map() - * is intended for callables without side-effects. - * - * @param callable(T):mixed $callable - * - * @return Option - */ - abstract public function forAll($callable); - - /** - * Applies the callable to the value of the option if it is non-empty, - * and returns the return value of the callable wrapped in Some(). - * - * If the option is empty, then the callable is not applied. - * - * ```php - * (new Some("foo"))->map('strtoupper')->get(); // "FOO" - * ``` - * - * @template S - * - * @param callable(T):S $callable - * - * @return Option - */ - abstract public function map($callable); - - /** - * Applies the callable to the value of the option if it is non-empty, and - * returns the return value of the callable directly. - * - * In contrast to ``map``, the return value of the callable is expected to - * be an Option itself; it is not automatically wrapped in Some(). - * - * @template S - * - * @param callable(T):Option $callable must return an Option - * - * @return Option - */ - abstract public function flatMap($callable); - - /** - * If the option is empty, it is returned immediately without applying the callable. - * - * If the option is non-empty, the callable is applied, and if it returns true, - * the option itself is returned; otherwise, None is returned. - * - * @param callable(T):bool $callable - * - * @return Option - */ - abstract public function filter($callable); - - /** - * If the option is empty, it is returned immediately without applying the callable. - * - * If the option is non-empty, the callable is applied, and if it returns false, - * the option itself is returned; otherwise, None is returned. - * - * @param callable(T):bool $callable - * - * @return Option - */ - abstract public function filterNot($callable); - - /** - * If the option is empty, it is returned immediately. - * - * If the option is non-empty, and its value does not equal the passed value - * (via a shallow comparison ===), then None is returned. Otherwise, the - * Option is returned. - * - * In other words, this will filter all but the passed value. - * - * @param T $value - * - * @return Option - */ - abstract public function select($value); - - /** - * If the option is empty, it is returned immediately. - * - * If the option is non-empty, and its value does equal the passed value (via - * a shallow comparison ===), then None is returned; otherwise, the Option is - * returned. - * - * In other words, this will let all values through except the passed value. - * - * @param T $value - * - * @return Option - */ - abstract public function reject($value); - - /** - * Binary operator for the initial value and the option's value. - * - * If empty, the initial value is returned. If non-empty, the callable - * receives the initial value and the option's value as arguments. - * - * ```php - * - * $some = new Some(5); - * $none = None::create(); - * $result = $some->foldLeft(1, function($a, $b) { return $a + $b; }); // int(6) - * $result = $none->foldLeft(1, function($a, $b) { return $a + $b; }); // int(1) - * - * // This can be used instead of something like the following: - * $option = Option::fromValue($integerOrNull); - * $result = 1; - * if ( ! $option->isEmpty()) { - * $result += $option->get(); - * } - * ``` - * - * @template S - * - * @param S $initialValue - * @param callable(S, T):S $callable - * - * @return S - */ - abstract public function foldLeft($initialValue, $callable); - - /** - * foldLeft() but with reversed arguments for the callable. - * - * @template S - * - * @param S $initialValue - * @param callable(T, S):S $callable - * - * @return S - */ - abstract public function foldRight($initialValue, $callable); -} diff --git a/vendor/phpoption/phpoption/src/PhpOption/Some.php b/vendor/phpoption/phpoption/src/PhpOption/Some.php deleted file mode 100644 index 2961576..0000000 --- a/vendor/phpoption/phpoption/src/PhpOption/Some.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace PhpOption; - -use ArrayIterator; - -/** - * @template T - * - * @extends Option - */ -final class Some extends Option -{ - /** @var T */ - private $value; - - /** - * @param T $value - */ - public function __construct($value) - { - $this->value = $value; - } - - /** - * @template U - * - * @param U $value - * - * @return Some - */ - public static function create($value) - { - return new self($value); - } - - public function isDefined() - { - return true; - } - - public function isEmpty() - { - return false; - } - - public function get() - { - return $this->value; - } - - public function getOrElse($default) - { - return $this->value; - } - - public function getOrCall($callable) - { - return $this->value; - } - - public function getOrThrow(\Exception $ex) - { - return $this->value; - } - - public function orElse(Option $else) - { - return $this; - } - - public function ifDefined($callable) - { - $callable($this->value); - } - - public function forAll($callable) - { - $callable($this->value); - - return $this; - } - - public function map($callable) - { - return new self($callable($this->value)); - } - - public function flatMap($callable) - { - $rs = $callable($this->value); - if (!$rs instanceof Option) { - throw new \RuntimeException('Callables passed to flatMap() must return an Option. Maybe you should use map() instead?'); - } - - return $rs; - } - - public function filter($callable) - { - if (true === $callable($this->value)) { - return $this; - } - - return None::create(); - } - - public function filterNot($callable) - { - if (false === $callable($this->value)) { - return $this; - } - - return None::create(); - } - - public function select($value) - { - if ($this->value === $value) { - return $this; - } - - return None::create(); - } - - public function reject($value) - { - if ($this->value === $value) { - return None::create(); - } - - return $this; - } - - public function getIterator() - { - return new ArrayIterator([$this->value]); - } - - public function foldLeft($initialValue, $callable) - { - return $callable($initialValue, $this->value); - } - - public function foldRight($initialValue, $callable) - { - return $callable($this->value, $initialValue); - } -} diff --git a/vendor/symfony/polyfill-ctype/Ctype.php b/vendor/symfony/polyfill-ctype/Ctype.php deleted file mode 100644 index 58414dc..0000000 --- a/vendor/symfony/polyfill-ctype/Ctype.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\Polyfill\Ctype; - -/** - * Ctype implementation through regex. - * - * @internal - * - * @author Gert de Pagter - */ -final class Ctype -{ - /** - * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. - * - * @see https://php.net/ctype-alnum - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_alnum($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); - } - - /** - * Returns TRUE if every character in text is a letter, FALSE otherwise. - * - * @see https://php.net/ctype-alpha - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_alpha($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); - } - - /** - * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. - * - * @see https://php.net/ctype-cntrl - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_cntrl($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); - } - - /** - * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. - * - * @see https://php.net/ctype-digit - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_digit($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); - } - - /** - * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. - * - * @see https://php.net/ctype-graph - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_graph($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); - } - - /** - * Returns TRUE if every character in text is a lowercase letter. - * - * @see https://php.net/ctype-lower - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_lower($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); - } - - /** - * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. - * - * @see https://php.net/ctype-print - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_print($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); - } - - /** - * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. - * - * @see https://php.net/ctype-punct - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_punct($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); - } - - /** - * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. - * - * @see https://php.net/ctype-space - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_space($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); - } - - /** - * Returns TRUE if every character in text is an uppercase letter. - * - * @see https://php.net/ctype-upper - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_upper($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); - } - - /** - * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. - * - * @see https://php.net/ctype-xdigit - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_xdigit($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); - } - - /** - * Converts integers to their char versions according to normal ctype behaviour, if needed. - * - * If an integer between -128 and 255 inclusive is provided, - * it is interpreted as the ASCII value of a single character - * (negative values have 256 added in order to allow characters in the Extended ASCII range). - * Any other integer is interpreted as a string containing the decimal digits of the integer. - * - * @param string|int $int - * - * @return mixed - */ - private static function convert_int_to_char_for_ctype($int) - { - if (!\is_int($int)) { - return $int; - } - - if ($int < -128 || $int > 255) { - return (string) $int; - } - - if ($int < 0) { - $int += 256; - } - - return \chr($int); - } -} diff --git a/vendor/symfony/polyfill-ctype/LICENSE b/vendor/symfony/polyfill-ctype/LICENSE deleted file mode 100644 index 3f853aa..0000000 --- a/vendor/symfony/polyfill-ctype/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-ctype/README.md b/vendor/symfony/polyfill-ctype/README.md deleted file mode 100644 index 8add1ab..0000000 --- a/vendor/symfony/polyfill-ctype/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Symfony Polyfill / Ctype -======================== - -This component provides `ctype_*` functions to users who run php versions without the ctype 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-ctype/bootstrap.php b/vendor/symfony/polyfill-ctype/bootstrap.php deleted file mode 100644 index 8d6fc4b..0000000 --- a/vendor/symfony/polyfill-ctype/bootstrap.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. - */ - -use Symfony\Polyfill\Ctype as p; - -if (!function_exists('ctype_alnum')) { - function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } -} -if (!function_exists('ctype_alpha')) { - function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } -} -if (!function_exists('ctype_cntrl')) { - function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } -} -if (!function_exists('ctype_digit')) { - function ctype_digit($text) { return p\Ctype::ctype_digit($text); } -} -if (!function_exists('ctype_graph')) { - function ctype_graph($text) { return p\Ctype::ctype_graph($text); } -} -if (!function_exists('ctype_lower')) { - function ctype_lower($text) { return p\Ctype::ctype_lower($text); } -} -if (!function_exists('ctype_print')) { - function ctype_print($text) { return p\Ctype::ctype_print($text); } -} -if (!function_exists('ctype_punct')) { - function ctype_punct($text) { return p\Ctype::ctype_punct($text); } -} -if (!function_exists('ctype_space')) { - function ctype_space($text) { return p\Ctype::ctype_space($text); } -} -if (!function_exists('ctype_upper')) { - function ctype_upper($text) { return p\Ctype::ctype_upper($text); } -} -if (!function_exists('ctype_xdigit')) { - function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } -} diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json deleted file mode 100644 index 90108c6..0000000 --- a/vendor/symfony/polyfill-ctype/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/polyfill-ctype", - "type": "library", - "description": "Symfony polyfill for ctype functions", - "keywords": ["polyfill", "compatibility", "portable", "ctype"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=5.3.3" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/vlucas/phpdotenv/LICENSE b/vendor/vlucas/phpdotenv/LICENSE deleted file mode 100644 index 922c552..0000000 --- a/vendor/vlucas/phpdotenv/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2014, Graham Campbell. -Copyright (c) 2013, Vance Lucas. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the copyright holder 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 HOLDER 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/vlucas/phpdotenv/Makefile b/vendor/vlucas/phpdotenv/Makefile deleted file mode 100644 index d8ccac1..0000000 --- a/vendor/vlucas/phpdotenv/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -install: - @docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:7.4-base update - @docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:7.4-base bin all update - -phpunit: - @rm -f bootstrap/cache/*.php && docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:7.4-cli - -phpstan-analyze-src: - @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:7.4-cli analyze src -c phpstan.src.neon.dist - -phpstan-analyze-tests: - @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:7.4-cli analyze tests -c phpstan.tests.neon.dist - -psalm-analyze: - @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm --rm registry.gitlab.com/grahamcampbell/php:7.4-cli - -psalm-show-info: - @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm --rm registry.gitlab.com/grahamcampbell/php:7.4-cli --show-info=true - -test: phpunit phpstan-analyze-src phpstan-analyze-tests psalm-analyze - -clean: - @rm -rf .phpunit.result.cache composer.lock vendor vendor-bin/*/composer.lock vendor-bin/*/vendor diff --git a/vendor/vlucas/phpdotenv/composer.json b/vendor/vlucas/phpdotenv/composer.json deleted file mode 100644 index aa3c528..0000000 --- a/vendor/vlucas/phpdotenv/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "vlucas/phpdotenv", - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": ["env", "dotenv", "environment"], - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" - } - ], - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" - }, - "require-dev": { - "ext-filter": "*", - "ext-pcre": "*", - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Dotenv\\Tests\\": "tests/Dotenv/" - } - }, - "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." - }, - "config": { - "preferred-install": "dist" - }, - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - } -} diff --git a/vendor/vlucas/phpdotenv/phpstan.src.neon.dist b/vendor/vlucas/phpdotenv/phpstan.src.neon.dist deleted file mode 100644 index 9c015be..0000000 --- a/vendor/vlucas/phpdotenv/phpstan.src.neon.dist +++ /dev/null @@ -1,10 +0,0 @@ -parameters: - level: max - ignoreErrors: - - '#Anonymous function should have native return typehint ".+".#' - - '#Call to function is_string\(\) with string will always evaluate to true.#' - - '#Variable \$defaults might not be defined.#' - - '/^Parameter \#1 \$readers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/' - - '/^Parameter \#2 \$writers of class Dotenv\\Repository\\[a-zA-Z]*Repository[a-zA-Z]* constructor expects/' - - '#Parameter \#1 \$name of method Dotenv\\Repository\\AbstractRepository::set\(\) expects string, string\|null given.#' - - '#Parameter \#.+ of method Dotenv\\Repository\\AbstractRepository::offset.+ should be contravariant .+#' diff --git a/vendor/vlucas/phpdotenv/src/Dotenv.php b/vendor/vlucas/phpdotenv/src/Dotenv.php deleted file mode 100644 index 01935d5..0000000 --- a/vendor/vlucas/phpdotenv/src/Dotenv.php +++ /dev/null @@ -1,157 +0,0 @@ -loader = $loader; - $this->repository = $repository; - $this->store = is_array($store) ? new FileStore($store, true) : $store; - } - - /** - * Create a new dotenv instance. - * - * @param \Dotenv\Repository\RepositoryInterface $repository - * @param string|string[] $paths - * @param string|string[]|null $names - * @param bool $shortCircuit - * - * @return \Dotenv\Dotenv - */ - public static function create(RepositoryInterface $repository, $paths, $names = null, $shortCircuit = true) - { - $builder = StoreBuilder::create()->withPaths($paths)->withNames($names); - - if ($shortCircuit) { - $builder = $builder->shortCircuit(); - } - - return new self(new Loader(), $repository, $builder->make()); - } - - /** - * Create a new mutable dotenv instance with default repository. - * - * @param string|string[] $paths - * @param string|string[]|null $names - * @param bool $shortCircuit - * - * @return \Dotenv\Dotenv - */ - public static function createMutable($paths, $names = null, $shortCircuit = true) - { - $repository = RepositoryBuilder::create()->make(); - - return self::create($repository, $paths, $names, $shortCircuit); - } - - /** - * Create a new immutable dotenv instance with default repository. - * - * @param string|string[] $paths - * @param string|string[]|null $names - * @param bool $shortCircuit - * - * @return \Dotenv\Dotenv - */ - public static function createImmutable($paths, $names = null, $shortCircuit = true) - { - $repository = RepositoryBuilder::create()->immutable()->make(); - - return self::create($repository, $paths, $names, $shortCircuit); - } - - /** - * Read and load environment file(s). - * - * @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException - * - * @return array - */ - public function load() - { - return $this->loader->load($this->repository, $this->store->read()); - } - - /** - * Read and load environment file(s), silently failing if no files can be read. - * - * @throws \Dotenv\Exception\InvalidFileException - * - * @return array - */ - public function safeLoad() - { - try { - return $this->load(); - } catch (InvalidPathException $e) { - // suppressing exception - return []; - } - } - - /** - * Required ensures that the specified variables exist, and returns a new validator object. - * - * @param string|string[] $variables - * - * @return \Dotenv\Validator - */ - public function required($variables) - { - return new Validator($this->repository, (array) $variables); - } - - /** - * Returns a new validator object that won't check if the specified variables exist. - * - * @param string|string[] $variables - * - * @return \Dotenv\Validator - */ - public function ifPresent($variables) - { - return new Validator($this->repository, (array) $variables, false); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php b/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php deleted file mode 100644 index 3ff0cef..0000000 --- a/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php +++ /dev/null @@ -1,8 +0,0 @@ - 1; - } - - /** - * Get all pairs of adjacent characters within the line. - * - * @param string $line - * - * @return array{array{string,string|null}} - */ - private static function getCharPairs($line) - { - $chars = str_split($line); - - /** @var array{array{string,string|null}} */ - return array_map(null, $chars, array_slice($chars, 1)); - } - - /** - * Determine if the line in the file is a comment or whitespace. - * - * @param string $line - * - * @return bool - */ - private static function isCommentOrWhitespace($line) - { - if (trim($line) === '') { - return true; - } - - $line = ltrim($line); - - return isset($line[0]) && $line[0] === '#'; - } -} diff --git a/vendor/vlucas/phpdotenv/src/Loader/Loader.php b/vendor/vlucas/phpdotenv/src/Loader/Loader.php deleted file mode 100644 index 84e3b9a..0000000 --- a/vendor/vlucas/phpdotenv/src/Loader/Loader.php +++ /dev/null @@ -1,122 +0,0 @@ -whitelist = $whitelist; - } - - /** - * Load the given environment file content into the repository. - * - * @param \Dotenv\Repository\RepositoryInterface $repository - * @param string $content - * - * @throws \Dotenv\Exception\InvalidFileException - * - * @return array - */ - public function load(RepositoryInterface $repository, $content) - { - return $this->processEntries( - $repository, - Lines::process(Regex::split("/(\r\n|\n|\r)/", $content)->getSuccess()) - ); - } - - /** - * Process the environment variable entries. - * - * We'll fill out any nested variables, and acually set the variable using - * the underlying environment variables instance. - * - * @param \Dotenv\Repository\RepositoryInterface $repository - * @param string[] $entries - * - * @throws \Dotenv\Exception\InvalidFileException - * - * @return array - */ - private function processEntries(RepositoryInterface $repository, array $entries) - { - $vars = []; - - foreach ($entries as $entry) { - list($name, $value) = Parser::parse($entry); - if ($this->whitelist === null || in_array($name, $this->whitelist, true)) { - $vars[$name] = self::resolveNestedVariables($repository, $value); - $repository->set($name, $vars[$name]); - } - } - - return $vars; - } - - /** - * Resolve the nested variables. - * - * Look for ${varname} patterns in the variable value and replace with an - * existing environment variable. - * - * @param \Dotenv\Repository\RepositoryInterface $repository - * @param \Dotenv\Loader\Value|null $value - * - * @return string|null - */ - private static function resolveNestedVariables(RepositoryInterface $repository, Value $value = null) - { - /** @var Option */ - $option = Option::fromValue($value); - - return $option - ->map(function (Value $v) use ($repository) { - /** @var string */ - return array_reduce($v->getVars(), function ($s, $i) use ($repository) { - return substr($s, 0, $i).self::resolveNestedVariable($repository, substr($s, $i)); - }, $v->getChars()); - }) - ->getOrElse(null); - } - - /** - * Resolve a single nested variable. - * - * @param \Dotenv\Repository\RepositoryInterface $repository - * @param string $str - * - * @return string - */ - private static function resolveNestedVariable(RepositoryInterface $repository, $str) - { - return Regex::replaceCallback( - '/\A\${([a-zA-Z0-9_.]+)}/', - function (array $matches) use ($repository) { - return Option::fromValue($repository->get($matches[1])) - ->getOrElse($matches[0]); - }, - $str, - 1 - )->success()->getOrElse($str); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php b/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php deleted file mode 100644 index 740e1c5..0000000 --- a/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - public function load(RepositoryInterface $repository, $content); -} diff --git a/vendor/vlucas/phpdotenv/src/Loader/Parser.php b/vendor/vlucas/phpdotenv/src/Loader/Parser.php deleted file mode 100644 index af0e317..0000000 --- a/vendor/vlucas/phpdotenv/src/Loader/Parser.php +++ /dev/null @@ -1,241 +0,0 @@ -success()->getOrElse(0) === 1; - } - - /** - * Strips quotes and comments from the environment variable value. - * - * @param string|null $value - * - * @throws \Dotenv\Exception\InvalidFileException - * - * @return \Dotenv\Loader\Value|null - */ - private static function parseValue($value) - { - if ($value === null) { - return null; - } - - if (trim($value) === '') { - return Value::blank(); - } - - return array_reduce(str_split($value), function ($data, $char) use ($value) { - return self::processChar($data[1], $char)->mapError(function ($err) use ($value) { - throw new InvalidFileException( - self::getErrorMessage($err, $value) - ); - })->mapSuccess(function ($val) use ($data) { - return [$data[0]->append($val[0], $val[1]), $val[2]]; - })->getSuccess(); - }, [Value::blank(), self::INITIAL_STATE])[0]; - } - - /** - * Process the given character. - * - * @param int $state - * @param string $char - * - * @return \Dotenv\Result\Result - */ - private static function processChar($state, $char) - { - switch ($state) { - case self::INITIAL_STATE: - if ($char === '\'') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::SINGLE_QUOTED_STATE]); - } elseif ($char === '"') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::DOUBLE_QUOTED_STATE]); - } elseif ($char === '#') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::COMMENT_STATE]); - } elseif ($char === '$') { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, true, self::UNQUOTED_STATE]); - } else { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, false, self::UNQUOTED_STATE]); - } - case self::UNQUOTED_STATE: - if ($char === '#') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::COMMENT_STATE]); - } elseif (ctype_space($char)) { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::WHITESPACE_STATE]); - } elseif ($char === '$') { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, true, self::UNQUOTED_STATE]); - } else { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, false, self::UNQUOTED_STATE]); - } - case self::SINGLE_QUOTED_STATE: - if ($char === '\'') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::WHITESPACE_STATE]); - } else { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, false, self::SINGLE_QUOTED_STATE]); - } - case self::DOUBLE_QUOTED_STATE: - if ($char === '"') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::WHITESPACE_STATE]); - } elseif ($char === '\\') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::ESCAPE_SEQUENCE_STATE]); - } elseif ($char === '$') { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, true, self::DOUBLE_QUOTED_STATE]); - } else { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, false, self::DOUBLE_QUOTED_STATE]); - } - case self::ESCAPE_SEQUENCE_STATE: - if ($char === '"' || $char === '\\') { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, false, self::DOUBLE_QUOTED_STATE]); - } elseif ($char === '$') { - /** @var \Dotenv\Result\Result */ - return Success::create([$char, false, self::DOUBLE_QUOTED_STATE]); - } elseif (in_array($char, ['f', 'n', 'r', 't', 'v'], true)) { - /** @var \Dotenv\Result\Result */ - return Success::create([stripcslashes('\\'.$char), false, self::DOUBLE_QUOTED_STATE]); - } else { - /** @var \Dotenv\Result\Result */ - return Error::create('an unexpected escape sequence'); - } - case self::WHITESPACE_STATE: - if ($char === '#') { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::COMMENT_STATE]); - } elseif (!ctype_space($char)) { - /** @var \Dotenv\Result\Result */ - return Error::create('unexpected whitespace'); - } else { - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::WHITESPACE_STATE]); - } - case self::COMMENT_STATE: - /** @var \Dotenv\Result\Result */ - return Success::create(['', false, self::COMMENT_STATE]); - default: - throw new RuntimeException('Parser entered invalid state.'); - } - } - - /** - * Generate a friendly error message. - * - * @param string $cause - * @param string $subject - * - * @return string - */ - private static function getErrorMessage($cause, $subject) - { - return sprintf( - 'Failed to parse dotenv file due to %s. Failed at [%s].', - $cause, - strtok($subject, "\n") - ); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Loader/Value.php b/vendor/vlucas/phpdotenv/src/Loader/Value.php deleted file mode 100644 index 3722087..0000000 --- a/vendor/vlucas/phpdotenv/src/Loader/Value.php +++ /dev/null @@ -1,83 +0,0 @@ -chars = $chars; - $this->vars = $vars; - } - - /** - * Create an empty value instance. - * - * @return \Dotenv\Loader\Value - */ - public static function blank() - { - return new self('', []); - } - - /** - * Create a new value instance, appending the character. - * - * @param string $char - * @param bool $var - * - * @return \Dotenv\Loader\Value - */ - public function append($char, $var) - { - return new self( - $this->chars.$char, - $var ? array_merge($this->vars, [strlen($this->chars)]) : $this->vars - ); - } - - /** - * Get the string representation of the parsed value. - * - * @return string - */ - public function getChars() - { - return $this->chars; - } - - /** - * Get the locations of the variables in the value. - * - * @return int[] - */ - public function getVars() - { - $vars = $this->vars; - rsort($vars); - - return $vars; - } -} diff --git a/vendor/vlucas/phpdotenv/src/Regex/Regex.php b/vendor/vlucas/phpdotenv/src/Regex/Regex.php deleted file mode 100644 index 2b322ab..0000000 --- a/vendor/vlucas/phpdotenv/src/Regex/Regex.php +++ /dev/null @@ -1,125 +0,0 @@ - - */ - public static function match($pattern, $subject) - { - return self::pregAndWrap(function ($subject) use ($pattern) { - return (int) @preg_match($pattern, $subject); - }, $subject); - } - - /** - * Perform a preg replace, wrapping up the result. - * - * @param string $pattern - * @param string $replacement - * @param string $subject - * @param int|null $limit - * - * @return \Dotenv\Result\Result - */ - public static function replace($pattern, $replacement, $subject, $limit = null) - { - return self::pregAndWrap(function ($subject) use ($pattern, $replacement, $limit) { - return (string) @preg_replace($pattern, $replacement, $subject, $limit === null ? -1 : $limit); - }, $subject); - } - - /** - * Perform a preg replace callback, wrapping up the result. - * - * @param string $pattern - * @param callable $callback - * @param string $subject - * @param int|null $limit - * - * @return \Dotenv\Result\Result - */ - public static function replaceCallback($pattern, callable $callback, $subject, $limit = null) - { - return self::pregAndWrap(function ($subject) use ($pattern, $callback, $limit) { - return (string) @preg_replace_callback($pattern, $callback, $subject, $limit === null ? -1 : $limit); - }, $subject); - } - - /** - * Perform a preg split, wrapping up the result. - * - * @param string $pattern - * @param string $subject - * - * @return \Dotenv\Result\Result - */ - public static function split($pattern, $subject) - { - return self::pregAndWrap(function ($subject) use ($pattern) { - /** @var string[] */ - return (array) @preg_split($pattern, $subject); - }, $subject); - } - - /** - * Perform a preg operation, wrapping up the result. - * - * @template V - * - * @param callable(string):V $operation - * @param string $subject - * - * @return \Dotenv\Result\Result - */ - private static function pregAndWrap(callable $operation, $subject) - { - $result = $operation($subject); - - if (($e = preg_last_error()) !== PREG_NO_ERROR) { - return Error::create(self::lookupError($e)); - } - - return Success::create($result); - } - - /** - * Lookup the preg error code. - * - * @param int $code - * - * @return string - */ - private static function lookupError($code) - { - if (defined('PREG_JIT_STACKLIMIT_ERROR') && $code === PREG_JIT_STACKLIMIT_ERROR) { - return 'JIT stack limit exhausted'; - } - - switch ($code) { - 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'; - default: - return 'Unknown error'; - } - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php b/vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php deleted file mode 100644 index 247f950..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php +++ /dev/null @@ -1,175 +0,0 @@ -immutable = $immutable; - $this->loaded = new ArrayAdapter(); - } - - /** - * Get an environment variable. - * - * @param string $name - * - * @throws \InvalidArgumentException - * - * @return string|null - */ - public function get($name) - { - if (!is_string($name)) { - throw new InvalidArgumentException('Expected name to be a string.'); - } - - return $this->getInternal($name); - } - - /** - * Get an environment variable. - * - * @param string $name - * - * @return string|null - */ - abstract protected function getInternal($name); - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function set($name, $value = null) - { - if (!is_string($name)) { - throw new InvalidArgumentException('Expected name to be a string.'); - } - - // Don't overwrite existing environment variables if we're immutable - // Ruby's dotenv does this with `ENV[key] ||= value`. - if ($this->immutable && $this->get($name) !== null && $this->loaded->get($name)->isEmpty()) { - return; - } - - $this->setInternal($name, $value); - $this->loaded->set($name, ''); - } - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @return void - */ - abstract protected function setInternal($name, $value = null); - - /** - * Clear an environment variable. - * - * @param string $name - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function clear($name) - { - if (!is_string($name)) { - throw new InvalidArgumentException('Expected name to be a string.'); - } - - // Don't clear anything if we're immutable. - if ($this->immutable) { - return; - } - - $this->clearInternal($name); - } - - /** - * Clear an environment variable. - * - * @param string $name - * - * @return void - */ - abstract protected function clearInternal($name); - - /** - * Tells whether environment variable has been defined. - * - * @param string $name - * - * @return bool - */ - public function has($name) - { - return is_string($name) && $this->get($name) !== null; - } - - /** - * {@inheritdoc} - */ - public function offsetExists($offset) - { - return $this->has($offset); - } - - /** - * {@inheritdoc} - */ - public function offsetGet($offset) - { - return $this->get($offset); - } - - /** - * {@inheritdoc} - */ - public function offsetSet($offset, $value) - { - $this->set($offset, $value); - } - - /** - * {@inheritdoc} - */ - public function offsetUnset($offset) - { - $this->clear($offset); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php deleted file mode 100644 index 73ce87d..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ - public function get($name) - { - return None::create(); - } - - /** - * Set an environment variable. - * - * Only if an existing apache variable exists do we overwrite it. - * - * @param string $name - * @param string|null $value - * - * @return void - */ - public function set($name, $value = null) - { - if (apache_getenv($name) !== false) { - apache_setenv($name, (string) $value); - } - } - - /** - * Clear an environment variable. - * - * @param string $name - * - * @return void - */ - public function clear($name) - { - // Nothing to do here. - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php deleted file mode 100644 index dc234aa..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ - private $variables = []; - - /** - * Determines if the adapter is supported. - * - * @return bool - */ - public function isSupported() - { - return true; - } - - /** - * Get an environment variable, if it exists. - * - * @param string $name - * - * @return \PhpOption\Option - */ - public function get($name) - { - if (array_key_exists($name, $this->variables)) { - return Some::create($this->variables[$name]); - } - - return None::create(); - } - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @return void - */ - public function set($name, $value = null) - { - $this->variables[$name] = $value; - } - - /** - * Clear an environment variable. - * - * @param string $name - * - * @return void - */ - public function clear($name) - { - unset($this->variables[$name]); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/AvailabilityInterface.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/AvailabilityInterface.php deleted file mode 100644 index b035372..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/AvailabilityInterface.php +++ /dev/null @@ -1,13 +0,0 @@ - - */ - public function get($name) - { - if (array_key_exists($name, $_ENV)) { - return Some::create($_ENV[$name]); - } - - return None::create(); - } - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @return void - */ - public function set($name, $value = null) - { - $_ENV[$name] = $value; - } - - /** - * Clear an environment variable. - * - * @param string $name - * - * @return void - */ - public function clear($name) - { - unset($_ENV[$name]); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php deleted file mode 100644 index 766afd3..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php +++ /dev/null @@ -1,56 +0,0 @@ - - */ - public function get($name) - { - /** @var \PhpOption\Option */ - return Option::fromValue(getenv($name), false); - } - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @return void - */ - public function set($name, $value = null) - { - putenv("$name=$value"); - } - - /** - * Clear an environment variable. - * - * @param string $name - * - * @return void - */ - public function clear($name) - { - putenv($name); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php deleted file mode 100644 index 90a1fab..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ - public function get($name); -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php deleted file mode 100644 index 529df96..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ - public function get($name) - { - if (array_key_exists($name, $_SERVER)) { - return Some::create($_SERVER[$name]); - } - - return None::create(); - } - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @return void - */ - public function set($name, $value = null) - { - $_SERVER[$name] = $value; - } - - /** - * Clear an environment variable. - * - * @param string $name - * - * @return void - */ - public function clear($name) - { - unset($_SERVER[$name]); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php deleted file mode 100644 index 6670b72..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -readers = $readers; - $this->writers = $writers; - parent::__construct($immutable); - } - - /** - * Get an environment variable. - * - * We do this by querying our readers sequentially. - * - * @param string $name - * - * @return string|null - */ - protected function getInternal($name) - { - foreach ($this->readers as $reader) { - $result = $reader->get($name); - if ($result->isDefined()) { - return $result->get(); - } - } - - return null; - } - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @return void - */ - protected function setInternal($name, $value = null) - { - foreach ($this->writers as $writers) { - $writers->set($name, $value); - } - } - - /** - * Clear an environment variable. - * - * @param string $name - * - * @return void - */ - protected function clearInternal($name) - { - foreach ($this->writers as $writers) { - $writers->clear($name); - } - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php b/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php deleted file mode 100644 index 66c1105..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php +++ /dev/null @@ -1,144 +0,0 @@ -readers = $readers; - $this->writers = $writers; - $this->immutable = $immutable; - } - - /** - * Create a new repository builder instance. - * - * @return \Dotenv\Repository\RepositoryBuilder - */ - public static function create() - { - return new self(); - } - - /** - * Creates a repository builder with the given readers. - * - * @param \Dotenv\Repository\Adapter\ReaderInterface[]|null $readers - * - * @return \Dotenv\Repository\RepositoryBuilder - */ - public function withReaders(array $readers = null) - { - $readers = $readers === null ? null : self::filterByAvailability($readers); - - return new self($readers, $this->writers, $this->immutable); - } - - /** - * Creates a repository builder with the given writers. - * - * @param \Dotenv\Repository\Adapter\WriterInterface[]|null $writers - * - * @return \Dotenv\Repository\RepositoryBuilder - */ - public function withWriters(array $writers = null) - { - $writers = $writers === null ? null : self::filterByAvailability($writers); - - return new self($this->readers, $writers, $this->immutable); - } - - /** - * Creates a repository builder with mutability enabled. - * - * @return \Dotenv\Repository\RepositoryBuilder - */ - public function immutable() - { - return new self($this->readers, $this->writers, true); - } - - /** - * Creates a new repository instance. - * - * @return \Dotenv\Repository\RepositoryInterface - */ - public function make() - { - if ($this->readers === null || $this->writers === null) { - $defaults = self::defaultAdapters(); - } - - return new AdapterRepository( - $this->readers === null ? $defaults : $this->readers, - $this->writers === null ? $defaults : $this->writers, - $this->immutable - ); - } - - /** - * Return the array of default adapters. - * - * @return \Dotenv\Repository\Adapter\AvailabilityInterface[] - */ - private static function defaultAdapters() - { - return self::filterByAvailability([ - new ApacheAdapter(), - new EnvConstAdapter(), - new ServerConstAdapter(), - new PutenvAdapter(), - ]); - } - - /** - * Filter an array of adapters to only those that are supported. - * - * @param \Dotenv\Repository\Adapter\AvailabilityInterface[] $adapters - * - * @return \Dotenv\Repository\Adapter\AvailabilityInterface[] - */ - private static function filterByAvailability(array $adapters) - { - return array_filter($adapters, function (AvailabilityInterface $adapter) { - return $adapter->isSupported(); - }); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php b/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php deleted file mode 100644 index db66416..0000000 --- a/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -interface RepositoryInterface extends ArrayAccess -{ - /** - * Tells whether environment variable has been defined. - * - * @param string $name - * - * @return bool - */ - public function has($name); - - /** - * Get an environment variable. - * - * @param string $name - * - * @throws \InvalidArgumentException - * - * @return string|null - */ - public function get($name); - - /** - * Set an environment variable. - * - * @param string $name - * @param string|null $value - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function set($name, $value = null); - - /** - * Clear an environment variable. - * - * @param string $name - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function clear($name); -} diff --git a/vendor/vlucas/phpdotenv/src/Result/Error.php b/vendor/vlucas/phpdotenv/src/Result/Error.php deleted file mode 100644 index d0be21d..0000000 --- a/vendor/vlucas/phpdotenv/src/Result/Error.php +++ /dev/null @@ -1,93 +0,0 @@ - - */ -class Error extends Result -{ - /** - * @var E - */ - private $value; - - /** - * Internal constructor for an error value. - * - * @param E $value - * - * @return void - */ - private function __construct($value) - { - $this->value = $value; - } - - /** - * Create a new error value. - * - * @template F - * - * @param F $value - * - * @return \Dotenv\Result\Result - */ - public static function create($value) - { - return new self($value); - } - - /** - * Get the success option value. - * - * @return \PhpOption\Option - */ - public function success() - { - return None::create(); - } - - /** - * Map over the success value. - * - * @template S - * - * @param callable(T):S $f - * - * @return \Dotenv\Result\Result - */ - public function mapSuccess(callable $f) - { - return self::create($this->value); - } - - /** - * Get the error option value. - * - * @return \PhpOption\Option - */ - public function error() - { - return Some::create($this->value); - } - - /** - * Map over the error value. - * - * @template F - * - * @param callable(E):F $f - * - * @return \Dotenv\Result\Result - */ - public function mapError(callable $f) - { - return self::create($f($this->value)); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Result/Result.php b/vendor/vlucas/phpdotenv/src/Result/Result.php deleted file mode 100644 index 0a3656a..0000000 --- a/vendor/vlucas/phpdotenv/src/Result/Result.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ - abstract public function success(); - - /** - * Get the success value, if possible. - * - * @throws \RuntimeException - * - * @return T - */ - public function getSuccess() - { - return $this->success()->get(); - } - - /** - * Map over the success value. - * - * @template S - * - * @param callable(T):S $f - * - * @return \Dotenv\Result\Result - */ - abstract public function mapSuccess(callable $f); - - /** - * Get the error option value. - * - * @return \PhpOption\Option - */ - abstract public function error(); - - /** - * Get the error value, if possible. - * - * @throws \RuntimeException - * - * @return E - */ - public function getError() - { - return $this->error()->get(); - } - - /** - * Map over the error value. - * - * @template F - * - * @param callable(E):F $f - * - * @return \Dotenv\Result\Result - */ - abstract public function mapError(callable $f); -} diff --git a/vendor/vlucas/phpdotenv/src/Result/Success.php b/vendor/vlucas/phpdotenv/src/Result/Success.php deleted file mode 100644 index 32ebd9a..0000000 --- a/vendor/vlucas/phpdotenv/src/Result/Success.php +++ /dev/null @@ -1,93 +0,0 @@ - - */ -class Success extends Result -{ - /** - * @var T - */ - private $value; - - /** - * Internal constructor for a success value. - * - * @param T $value - * - * @return void - */ - private function __construct($value) - { - $this->value = $value; - } - - /** - * Create a new error value. - * - * @template S - * - * @param S $value - * - * @return \Dotenv\Result\Result - */ - public static function create($value) - { - return new self($value); - } - - /** - * Get the success option value. - * - * @return \PhpOption\Option - */ - public function success() - { - return Some::create($this->value); - } - - /** - * Map over the success value. - * - * @template S - * - * @param callable(T):S $f - * - * @return \Dotenv\Result\Result - */ - public function mapSuccess(callable $f) - { - return self::create($f($this->value)); - } - - /** - * Get the error option value. - * - * @return \PhpOption\Option - */ - public function error() - { - return None::create(); - } - - /** - * Map over the error value. - * - * @template F - * - * @param callable(E):F $f - * - * @return \Dotenv\Result\Result - */ - public function mapError(callable $f) - { - return self::create($this->value); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Store/File/Paths.php b/vendor/vlucas/phpdotenv/src/Store/File/Paths.php deleted file mode 100644 index 9896063..0000000 --- a/vendor/vlucas/phpdotenv/src/Store/File/Paths.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ - public static function read(array $filePaths, $shortCircuit = true) - { - $output = []; - - foreach ($filePaths as $filePath) { - $content = self::readFromFile($filePath); - if ($content->isDefined()) { - $output[$filePath] = $content->get(); - if ($shortCircuit) { - break; - } - } - } - - return $output; - } - - /** - * Read the given file. - * - * @param string $filePath - * - * @return \PhpOption\Option - */ - private static function readFromFile($filePath) - { - $content = @file_get_contents($filePath); - - /** @var \PhpOption\Option */ - return Option::fromValue($content, false); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Store/FileStore.php b/vendor/vlucas/phpdotenv/src/Store/FileStore.php deleted file mode 100644 index 8fed2a1..0000000 --- a/vendor/vlucas/phpdotenv/src/Store/FileStore.php +++ /dev/null @@ -1,61 +0,0 @@ -filePaths = $filePaths; - $this->shortCircuit = $shortCircuit; - } - - /** - * Read the content of the environment file(s). - * - * @throws \Dotenv\Exception\InvalidPathException - * - * @return string - */ - public function read() - { - if ($this->filePaths === []) { - throw new InvalidPathException('At least one environment file path must be provided.'); - } - - $contents = Reader::read($this->filePaths, $this->shortCircuit); - - if (count($contents) > 0) { - return implode("\n", $contents); - } - - throw new InvalidPathException( - sprintf('Unable to read any of the environment file(s) at [%s].', implode(', ', $this->filePaths)) - ); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php b/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php deleted file mode 100644 index 833f8b0..0000000 --- a/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php +++ /dev/null @@ -1,102 +0,0 @@ -paths = $paths; - $this->names = $names; - $this->shortCircuit = $shortCircuit; - } - - /** - * Create a new store builder instance. - * - * @return \Dotenv\Store\StoreBuilder - */ - public static function create() - { - return new self(); - } - - /** - * Creates a store builder with the given paths. - * - * @param string|string[] $paths - * - * @return \Dotenv\Store\StoreBuilder - */ - public function withPaths($paths) - { - return new self((array) $paths, $this->names, $this->shortCircuit); - } - - /** - * Creates a store builder with the given names. - * - * @param string|string[]|null $names - * - * @return \Dotenv\Store\StoreBuilder - */ - public function withNames($names = null) - { - return new self($this->paths, $names === null ? null : (array) $names, $this->shortCircuit); - } - - /** - * Creates a store builder with short circuit mode enabled. - * - * @return \Dotenv\Store\StoreBuilder - */ - public function shortCircuit() - { - return new self($this->paths, $this->names, true); - } - - /** - * Creates a new store instance. - * - * @return \Dotenv\Store\StoreInterface - */ - public function make() - { - return new FileStore( - Paths::filePaths($this->paths, $this->names === null ? ['.env'] : $this->names), - $this->shortCircuit - ); - } -} diff --git a/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php b/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php deleted file mode 100644 index 9113451..0000000 --- a/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php +++ /dev/null @@ -1,15 +0,0 @@ -repository = $repository; - $this->variables = $variables; - - if ($required) { - $this->assertCallback( - function ($value) { - return $value !== null; - }, - 'is missing' - ); - } - } - - /** - * Assert that each variable is not empty. - * - * @throws \Dotenv\Exception\ValidationException - * - * @return \Dotenv\Validator - */ - public function notEmpty() - { - return $this->assertCallback( - function ($value) { - if ($value === null) { - return true; - } - - return strlen(trim($value)) > 0; - }, - 'is empty' - ); - } - - /** - * Assert that each specified variable is an integer. - * - * @throws \Dotenv\Exception\ValidationException - * - * @return \Dotenv\Validator - */ - public function isInteger() - { - return $this->assertCallback( - function ($value) { - if ($value === null) { - return true; - } - - return ctype_digit($value); - }, - 'is not an integer' - ); - } - - /** - * Assert that each specified variable is a boolean. - * - * @throws \Dotenv\Exception\ValidationException - * - * @return \Dotenv\Validator - */ - public function isBoolean() - { - return $this->assertCallback( - function ($value) { - if ($value === null) { - return true; - } - - if ($value === '') { - return false; - } - - return filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) !== null; - }, - 'is not a boolean' - ); - } - - /** - * Assert that each variable is amongst the given choices. - * - * @param string[] $choices - * - * @throws \Dotenv\Exception\ValidationException - * - * @return \Dotenv\Validator - */ - public function allowedValues(array $choices) - { - return $this->assertCallback( - function ($value) use ($choices) { - if ($value === null) { - return true; - } - - return in_array($value, $choices, true); - }, - sprintf('is not one of [%s]', implode(', ', $choices)) - ); - } - - /** - * Assert that each variable matches the given regular expression. - * - * @param string $regex - * - * @throws \Dotenv\Exception\ValidationException - * - * @return \Dotenv\Validator - */ - public function allowedRegexValues($regex) - { - return $this->assertCallback( - function ($value) use ($regex) { - if ($value === null) { - return true; - } - - return Regex::match($regex, $value)->success()->getOrElse(0) === 1; - }, - sprintf('does not match "%s"', $regex) - ); - } - - /** - * Assert that the callback returns true for each variable. - * - * @param callable $callback - * @param string $message - * - * @throws \Dotenv\Exception\ValidationException - * - * @return \Dotenv\Validator - */ - protected function assertCallback(callable $callback, $message = 'failed callback assertion') - { - $failing = []; - - foreach ($this->variables as $variable) { - if ($callback($this->repository->get($variable)) === false) { - $failing[] = sprintf('%s %s', $variable, $message); - } - } - - if (count($failing) > 0) { - throw new ValidationException(sprintf( - 'One or more environment variables failed assertions: %s.', - implode(', ', $failing) - )); - } - - return $this; - } -}