From 120b0a3d45c1de5b4836fa956e2f4100887236be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Fri, 13 Dec 2019 18:00:57 +0100 Subject: [PATCH] Dump requirement checker (#449) --- .../bin/check-requirements.php | 4 +- .requirement-checker/src/Checker.php | 32 ++++++------ .requirement-checker/src/IO.php | 2 +- .../src/IsExtensionFulfilled.php | 4 +- .requirement-checker/src/IsFulfilled.php | 2 +- .../src/IsPhpVersionFulfilled.php | 8 +-- .requirement-checker/src/Printer.php | 6 +-- .requirement-checker/src/Requirement.php | 2 +- .../src/RequirementCollection.php | 8 +-- .requirement-checker/src/Terminal.php | 25 +++++++++- .requirement-checker/vendor/autoload.php | 2 +- .../vendor/composer/autoload_classmap.php | 34 ++++++------- .../vendor/composer/autoload_psr4.php | 4 +- .../vendor/composer/autoload_real.php | 8 +-- .../vendor/composer/autoload_static.php | 50 +++++++++---------- .../vendor/composer/semver/src/Comparator.php | 8 +-- .../src/Constraint/AbstractConstraint.php | 6 +-- .../semver/src/Constraint/Constraint.php | 8 +-- .../src/Constraint/ConstraintInterface.php | 4 +- .../semver/src/Constraint/EmptyConstraint.php | 6 +-- .../semver/src/Constraint/MultiConstraint.php | 6 +-- .../vendor/composer/semver/src/Semver.php | 14 +++--- .../composer/semver/src/VersionParser.php | 40 +++++++-------- 23 files changed, 152 insertions(+), 131 deletions(-) diff --git a/.requirement-checker/bin/check-requirements.php b/.requirement-checker/bin/check-requirements.php index b37e373b1..744631620 100644 --- a/.requirement-checker/bin/check-requirements.php +++ b/.requirement-checker/bin/check-requirements.php @@ -1,12 +1,12 @@ evaluateRequirements(); - $io = new \HumbugBox380\KevinGH\RequirementChecker\IO(); - self::printCheck($checkPassed, new \HumbugBox380\KevinGH\RequirementChecker\Printer($io->getVerbosity(), $io->hasColorSupport()), $requirements); + $io = new \HumbugBox383\KevinGH\RequirementChecker\IO(); + self::printCheck($checkPassed, new \HumbugBox383\KevinGH\RequirementChecker\Printer($io->getVerbosity(), $io->hasColorSupport()), $requirements); return $checkPassed; } - public static function printCheck($checkPassed, \HumbugBox380\KevinGH\RequirementChecker\Printer $printer, \HumbugBox380\KevinGH\RequirementChecker\RequirementCollection $requirements) + public static function printCheck($checkPassed, \HumbugBox383\KevinGH\RequirementChecker\Printer $printer, \HumbugBox383\KevinGH\RequirementChecker\RequirementCollection $requirements) { - if (\false === $checkPassed && \HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_VERY_VERBOSE > $printer->getVerbosity()) { - $printer->setVerbosity(\HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_VERY_VERBOSE); + if (\false === $checkPassed && \HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_VERY_VERBOSE > $printer->getVerbosity()) { + $printer->setVerbosity(\HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_VERY_VERBOSE); } - $verbosity = \HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_VERY_VERBOSE; + $verbosity = \HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_VERY_VERBOSE; $iniPath = $requirements->getPhpIniPath(); $printer->title('Box Requirements Checker', $verbosity); $printer->printv('> Using PHP ', $verbosity); @@ -42,9 +42,9 @@ public static function printCheck($checkPassed, \HumbugBox380\KevinGH\Requiremen $errorMessages = array(); foreach ($requirements->getRequirements() as $requirement) { if ($errorMessage = $printer->getRequirementErrorMessage($requirement)) { - if (\HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG === $printer->getVerbosity()) { - $printer->printvln('✘ ' . $requirement->getTestMessage(), \HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG, 'red'); - $printer->printv(' ', \HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG); + if (\HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG === $printer->getVerbosity()) { + $printer->printvln('✘ ' . $requirement->getTestMessage(), \HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG, 'red'); + $printer->printv(' ', \HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG); $errorMessages[] = $errorMessage; } else { $printer->printv('E', $verbosity, 'red'); @@ -52,14 +52,14 @@ public static function printCheck($checkPassed, \HumbugBox380\KevinGH\Requiremen } continue; } - if (\HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG === $printer->getVerbosity()) { - $printer->printvln('✔ ' . $requirement->getHelpText(), \HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG, 'green'); - $printer->printv(' ', \HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG); + if (\HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG === $printer->getVerbosity()) { + $printer->printvln('✔ ' . $requirement->getHelpText(), \HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG, 'green'); + $printer->printv(' ', \HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG); } else { $printer->printv('.', $verbosity, 'green'); } } - if (\HumbugBox380\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG !== $printer->getVerbosity() && \count($requirements) > 0) { + if (\HumbugBox383\KevinGH\RequirementChecker\IO::VERBOSITY_DEBUG !== $printer->getVerbosity() && \count($requirements) > 0) { $printer->printvln('', $verbosity); } if ($requirements->evaluateRequirements()) { @@ -79,9 +79,9 @@ private static function retrieveRequirements() self::$requirementsConfig = __DIR__ . '/../.requirements.php'; } $config = (require self::$requirementsConfig); - $requirements = new \HumbugBox380\KevinGH\RequirementChecker\RequirementCollection(); + $requirements = new \HumbugBox383\KevinGH\RequirementChecker\RequirementCollection(); foreach ($config as $constraint) { - $requirements->addRequirement('php' === $constraint['type'] ? new \HumbugBox380\KevinGH\RequirementChecker\IsPhpVersionFulfilled($constraint['condition']) : new \HumbugBox380\KevinGH\RequirementChecker\IsExtensionFulfilled($constraint['condition']), $constraint['message'], $constraint['helpMessage']); + $requirements->addRequirement('php' === $constraint['type'] ? new \HumbugBox383\KevinGH\RequirementChecker\IsPhpVersionFulfilled($constraint['condition']) : new \HumbugBox383\KevinGH\RequirementChecker\IsExtensionFulfilled($constraint['condition']), $constraint['message'], $constraint['helpMessage']); } return $requirements; } diff --git a/.requirement-checker/src/IO.php b/.requirement-checker/src/IO.php index 0a5b304e1..8c918f502 100644 --- a/.requirement-checker/src/IO.php +++ b/.requirement-checker/src/IO.php @@ -1,6 +1,6 @@ requiredPhpVersion); + return \HumbugBox383\Composer\Semver\Semver::satisfies(\sprintf('%d.%d.%d', \PHP_MAJOR_VERSION, \PHP_MINOR_VERSION, \PHP_RELEASE_VERSION), $this->requiredPhpVersion); } } diff --git a/.requirement-checker/src/Printer.php b/.requirement-checker/src/Printer.php index 2d2edb9cb..61716a4a7 100644 --- a/.requirement-checker/src/Printer.php +++ b/.requirement-checker/src/Printer.php @@ -1,6 +1,6 @@ getWidth(), 80); } $this->verbosity = $verbosity; @@ -36,7 +36,7 @@ public function title($title, $verbosity, $style = null) $this->printvln(\str_repeat('=', \min(\strlen($title), $this->width)), $verbosity, $style); $this->printvln('', $verbosity, $style); } - public function getRequirementErrorMessage(\HumbugBox380\KevinGH\RequirementChecker\Requirement $requirement) + public function getRequirementErrorMessage(\HumbugBox383\KevinGH\RequirementChecker\Requirement $requirement) { if ($requirement->isFulfilled()) { return null; diff --git a/.requirement-checker/src/Requirement.php b/.requirement-checker/src/Requirement.php index 40fa20aeb..ed32e2449 100644 --- a/.requirement-checker/src/Requirement.php +++ b/.requirement-checker/src/Requirement.php @@ -1,6 +1,6 @@ requirements); } - public function add(\HumbugBox380\KevinGH\RequirementChecker\Requirement $requirement) + public function add(\HumbugBox383\KevinGH\RequirementChecker\Requirement $requirement) { $this->requirements[] = $requirement; } public function addRequirement($checkIsFulfilled, $testMessage, $helpText) { - $this->add(new \HumbugBox380\KevinGH\RequirementChecker\Requirement($checkIsFulfilled, $testMessage, $helpText)); + $this->add(new \HumbugBox383\KevinGH\RequirementChecker\Requirement($checkIsFulfilled, $testMessage, $helpText)); } public function getRequirements() { @@ -38,7 +38,7 @@ public function getPhpIniPath() } public function evaluateRequirements() { - return \array_reduce($this->requirements, function ($checkPassed, \HumbugBox380\KevinGH\RequirementChecker\Requirement $requirement) { + return \array_reduce($this->requirements, function ($checkPassed, \HumbugBox383\KevinGH\RequirementChecker\Requirement $requirement) { return $checkPassed && $requirement->isFulfilled(); }, \true); } diff --git a/.requirement-checker/src/Terminal.php b/.requirement-checker/src/Terminal.php index e00125396..d7969a5ba 100644 --- a/.requirement-checker/src/Terminal.php +++ b/.requirement-checker/src/Terminal.php @@ -1,6 +1,6 @@ &1', $output, $exitcode); + return self::$stty = 0 === $exitcode; + } private static function initDimensions() { if ('\\' === \DIRECTORY_SEPARATOR) { if (\preg_match('/^(\\d+)x(\\d+)(?: \\((\\d+)x(\\d+)\\))?$/', \trim(\getenv('ANSICON')), $matches)) { self::$width = (int) $matches[1]; self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2]; + } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) { + self::initDimensionsUsingStty(); } elseif (null !== ($dimensions = self::getConsoleMode())) { self::$width = (int) $dimensions[0]; self::$height = (int) $dimensions[1]; } - } elseif ($sttyString = self::getSttyColumns()) { + } else { + self::initDimensionsUsingStty(); + } + } + private static function hasVt100Support() + { + return \function_exists('sapi_windows_vt100_support') && \sapi_windows_vt100_support(\fopen('php://stdout', 'wb')); + } + private static function initDimensionsUsingStty() + { + if ($sttyString = self::getSttyColumns()) { if (\preg_match('/rows.(\\d+);.columns.(\\d+);/i', $sttyString, $matches)) { self::$width = (int) $matches[2]; self::$height = (int) $matches[1]; diff --git a/.requirement-checker/vendor/autoload.php b/.requirement-checker/vendor/autoload.php index 98b825e89..8aef9bf0a 100644 --- a/.requirement-checker/vendor/autoload.php +++ b/.requirement-checker/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit0d96cc2add98eaac9c2cac2d900e67fe::getLoader(); +return ComposerAutoloaderInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3::getLoader(); diff --git a/.requirement-checker/vendor/composer/autoload_classmap.php b/.requirement-checker/vendor/composer/autoload_classmap.php index 4906fd188..98b59d61d 100644 --- a/.requirement-checker/vendor/composer/autoload_classmap.php +++ b/.requirement-checker/vendor/composer/autoload_classmap.php @@ -6,21 +6,21 @@ $baseDir = dirname($vendorDir); return array( - 'HumbugBox380\\Composer\\Semver\\Comparator' => $vendorDir . '/composer/semver/src/Comparator.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\AbstractConstraint' => $vendorDir . '/composer/semver/src/Constraint/AbstractConstraint.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\Constraint' => $vendorDir . '/composer/semver/src/Constraint/Constraint.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\ConstraintInterface' => $vendorDir . '/composer/semver/src/Constraint/ConstraintInterface.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\EmptyConstraint' => $vendorDir . '/composer/semver/src/Constraint/EmptyConstraint.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\MultiConstraint' => $vendorDir . '/composer/semver/src/Constraint/MultiConstraint.php', - 'HumbugBox380\\Composer\\Semver\\Semver' => $vendorDir . '/composer/semver/src/Semver.php', - 'HumbugBox380\\Composer\\Semver\\VersionParser' => $vendorDir . '/composer/semver/src/VersionParser.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Checker' => $baseDir . '/src/Checker.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IO' => $baseDir . '/src/IO.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IsExtensionFulfilled' => $baseDir . '/src/IsExtensionFulfilled.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IsFulfilled' => $baseDir . '/src/IsFulfilled.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IsPhpVersionFulfilled' => $baseDir . '/src/IsPhpVersionFulfilled.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Printer' => $baseDir . '/src/Printer.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Requirement' => $baseDir . '/src/Requirement.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\RequirementCollection' => $baseDir . '/src/RequirementCollection.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Terminal' => $baseDir . '/src/Terminal.php', + 'HumbugBox383\\Composer\\Semver\\Comparator' => $vendorDir . '/composer/semver/src/Comparator.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\AbstractConstraint' => $vendorDir . '/composer/semver/src/Constraint/AbstractConstraint.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\Constraint' => $vendorDir . '/composer/semver/src/Constraint/Constraint.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\ConstraintInterface' => $vendorDir . '/composer/semver/src/Constraint/ConstraintInterface.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\EmptyConstraint' => $vendorDir . '/composer/semver/src/Constraint/EmptyConstraint.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\MultiConstraint' => $vendorDir . '/composer/semver/src/Constraint/MultiConstraint.php', + 'HumbugBox383\\Composer\\Semver\\Semver' => $vendorDir . '/composer/semver/src/Semver.php', + 'HumbugBox383\\Composer\\Semver\\VersionParser' => $vendorDir . '/composer/semver/src/VersionParser.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Checker' => $baseDir . '/src/Checker.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IO' => $baseDir . '/src/IO.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IsExtensionFulfilled' => $baseDir . '/src/IsExtensionFulfilled.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IsFulfilled' => $baseDir . '/src/IsFulfilled.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IsPhpVersionFulfilled' => $baseDir . '/src/IsPhpVersionFulfilled.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Printer' => $baseDir . '/src/Printer.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Requirement' => $baseDir . '/src/Requirement.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\RequirementCollection' => $baseDir . '/src/RequirementCollection.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Terminal' => $baseDir . '/src/Terminal.php', ); diff --git a/.requirement-checker/vendor/composer/autoload_psr4.php b/.requirement-checker/vendor/composer/autoload_psr4.php index a62e81395..dbe9f4131 100644 --- a/.requirement-checker/vendor/composer/autoload_psr4.php +++ b/.requirement-checker/vendor/composer/autoload_psr4.php @@ -6,6 +6,6 @@ $baseDir = dirname($vendorDir); return array( - 'HumbugBox380\\KevinGH\\RequirementChecker\\' => array($baseDir . '/src'), - 'HumbugBox380\\Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), + 'HumbugBox383\\KevinGH\\RequirementChecker\\' => array($baseDir . '/src'), + 'HumbugBox383\\Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), ); diff --git a/.requirement-checker/vendor/composer/autoload_real.php b/.requirement-checker/vendor/composer/autoload_real.php index 1b26ba5fc..4457e6415 100644 --- a/.requirement-checker/vendor/composer/autoload_real.php +++ b/.requirement-checker/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit0d96cc2add98eaac9c2cac2d900e67fe +class ComposerAutoloaderInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3 { private static $loader; @@ -19,15 +19,15 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit0d96cc2add98eaac9c2cac2d900e67fe', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit0d96cc2add98eaac9c2cac2d900e67fe', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 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\ComposerStaticInit0d96cc2add98eaac9c2cac2d900e67fe::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { diff --git a/.requirement-checker/vendor/composer/autoload_static.php b/.requirement-checker/vendor/composer/autoload_static.php index 3dcb632e6..8717e586b 100644 --- a/.requirement-checker/vendor/composer/autoload_static.php +++ b/.requirement-checker/vendor/composer/autoload_static.php @@ -4,53 +4,53 @@ namespace Composer\Autoload; -class ComposerStaticInit0d96cc2add98eaac9c2cac2d900e67fe +class ComposerStaticInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3 { public static $prefixLengthsPsr4 = array ( 'H' => array ( - 'HumbugBox380\\KevinGH\\RequirementChecker\\' => 40, - 'HumbugBox380\\Composer\\Semver\\' => 29, + 'HumbugBox383\\KevinGH\\RequirementChecker\\' => 40, + 'HumbugBox383\\Composer\\Semver\\' => 29, ), ); public static $prefixDirsPsr4 = array ( - 'HumbugBox380\\KevinGH\\RequirementChecker\\' => + 'HumbugBox383\\KevinGH\\RequirementChecker\\' => array ( 0 => __DIR__ . '/../..' . '/src', ), - 'HumbugBox380\\Composer\\Semver\\' => + 'HumbugBox383\\Composer\\Semver\\' => array ( 0 => __DIR__ . '/..' . '/composer/semver/src', ), ); public static $classMap = array ( - 'HumbugBox380\\Composer\\Semver\\Comparator' => __DIR__ . '/..' . '/composer/semver/src/Comparator.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\AbstractConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/AbstractConstraint.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\Constraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Constraint.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\ConstraintInterface' => __DIR__ . '/..' . '/composer/semver/src/Constraint/ConstraintInterface.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\EmptyConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/EmptyConstraint.php', - 'HumbugBox380\\Composer\\Semver\\Constraint\\MultiConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MultiConstraint.php', - 'HumbugBox380\\Composer\\Semver\\Semver' => __DIR__ . '/..' . '/composer/semver/src/Semver.php', - 'HumbugBox380\\Composer\\Semver\\VersionParser' => __DIR__ . '/..' . '/composer/semver/src/VersionParser.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Checker' => __DIR__ . '/../..' . '/src/Checker.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IO' => __DIR__ . '/../..' . '/src/IO.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IsExtensionFulfilled' => __DIR__ . '/../..' . '/src/IsExtensionFulfilled.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IsFulfilled' => __DIR__ . '/../..' . '/src/IsFulfilled.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\IsPhpVersionFulfilled' => __DIR__ . '/../..' . '/src/IsPhpVersionFulfilled.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Printer' => __DIR__ . '/../..' . '/src/Printer.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Requirement' => __DIR__ . '/../..' . '/src/Requirement.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\RequirementCollection' => __DIR__ . '/../..' . '/src/RequirementCollection.php', - 'HumbugBox380\\KevinGH\\RequirementChecker\\Terminal' => __DIR__ . '/../..' . '/src/Terminal.php', + 'HumbugBox383\\Composer\\Semver\\Comparator' => __DIR__ . '/..' . '/composer/semver/src/Comparator.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\AbstractConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/AbstractConstraint.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\Constraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Constraint.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\ConstraintInterface' => __DIR__ . '/..' . '/composer/semver/src/Constraint/ConstraintInterface.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\EmptyConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/EmptyConstraint.php', + 'HumbugBox383\\Composer\\Semver\\Constraint\\MultiConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MultiConstraint.php', + 'HumbugBox383\\Composer\\Semver\\Semver' => __DIR__ . '/..' . '/composer/semver/src/Semver.php', + 'HumbugBox383\\Composer\\Semver\\VersionParser' => __DIR__ . '/..' . '/composer/semver/src/VersionParser.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Checker' => __DIR__ . '/../..' . '/src/Checker.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IO' => __DIR__ . '/../..' . '/src/IO.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IsExtensionFulfilled' => __DIR__ . '/../..' . '/src/IsExtensionFulfilled.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IsFulfilled' => __DIR__ . '/../..' . '/src/IsFulfilled.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\IsPhpVersionFulfilled' => __DIR__ . '/../..' . '/src/IsPhpVersionFulfilled.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Printer' => __DIR__ . '/../..' . '/src/Printer.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Requirement' => __DIR__ . '/../..' . '/src/Requirement.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\RequirementCollection' => __DIR__ . '/../..' . '/src/RequirementCollection.php', + 'HumbugBox383\\KevinGH\\RequirementChecker\\Terminal' => __DIR__ . '/../..' . '/src/Terminal.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit0d96cc2add98eaac9c2cac2d900e67fe::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit0d96cc2add98eaac9c2cac2d900e67fe::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit0d96cc2add98eaac9c2cac2d900e67fe::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit4dcc0e1d4584ae7b8040cfa1b3dfe9e3::$classMap; }, null, ClassLoader::class); } diff --git a/.requirement-checker/vendor/composer/semver/src/Comparator.php b/.requirement-checker/vendor/composer/semver/src/Comparator.php index 62d78b69c..135ed297a 100644 --- a/.requirement-checker/vendor/composer/semver/src/Comparator.php +++ b/.requirement-checker/vendor/composer/semver/src/Comparator.php @@ -1,8 +1,8 @@ matches(new \HumbugBox380\Composer\Semver\Constraint\Constraint('==', $version1)); + $constraint = new \HumbugBox383\Composer\Semver\Constraint\Constraint($operator, $version2); + return $constraint->matches(new \HumbugBox383\Composer\Semver\Constraint\Constraint('==', $version1)); } } diff --git a/.requirement-checker/vendor/composer/semver/src/Constraint/AbstractConstraint.php b/.requirement-checker/vendor/composer/semver/src/Constraint/AbstractConstraint.php index 3c9bcb45f..f1b54409d 100644 --- a/.requirement-checker/vendor/composer/semver/src/Constraint/AbstractConstraint.php +++ b/.requirement-checker/vendor/composer/semver/src/Constraint/AbstractConstraint.php @@ -1,12 +1,12 @@ matchSpecific($provider); diff --git a/.requirement-checker/vendor/composer/semver/src/Constraint/Constraint.php b/.requirement-checker/vendor/composer/semver/src/Constraint/Constraint.php index 87002c325..a7fe81d67 100644 --- a/.requirement-checker/vendor/composer/semver/src/Constraint/Constraint.php +++ b/.requirement-checker/vendor/composer/semver/src/Constraint/Constraint.php @@ -1,8 +1,8 @@ matchSpecific($provider); @@ -60,7 +60,7 @@ public function versionCompare($a, $b, $operator, $compareBranches = \false) } return \version_compare($a, $b, $operator); } - public function matchSpecific(\HumbugBox380\Composer\Semver\Constraint\Constraint $provider, $compareBranches = \false) + public function matchSpecific(\HumbugBox383\Composer\Semver\Constraint\Constraint $provider, $compareBranches = \false) { $noEqualOp = \str_replace('=', '', self::$transOpInt[$this->operator]); $providerNoEqualOp = \str_replace('=', '', self::$transOpInt[$provider->operator]); diff --git a/.requirement-checker/vendor/composer/semver/src/Constraint/ConstraintInterface.php b/.requirement-checker/vendor/composer/semver/src/Constraint/ConstraintInterface.php index 3af3d98c7..ad297edab 100644 --- a/.requirement-checker/vendor/composer/semver/src/Constraint/ConstraintInterface.php +++ b/.requirement-checker/vendor/composer/semver/src/Constraint/ConstraintInterface.php @@ -1,10 +1,10 @@ conjunctive; } - public function matches(\HumbugBox380\Composer\Semver\Constraint\ConstraintInterface $provider) + public function matches(\HumbugBox383\Composer\Semver\Constraint\ConstraintInterface $provider) { if (\false === $this->conjunctive) { foreach ($this->constraints as $constraint) { diff --git a/.requirement-checker/vendor/composer/semver/src/Semver.php b/.requirement-checker/vendor/composer/semver/src/Semver.php index cbf37676c..273087be3 100644 --- a/.requirement-checker/vendor/composer/semver/src/Semver.php +++ b/.requirement-checker/vendor/composer/semver/src/Semver.php @@ -1,8 +1,8 @@ normalize($version)); + $provider = new \HumbugBox383\Composer\Semver\Constraint\Constraint('==', $versionParser->normalize($version)); $constraints = $versionParser->parseConstraints($constraints); return $constraints->matches($provider); } public static function satisfiedBy(array $versions, $constraints) { $versions = \array_filter($versions, function ($version) use($constraints) { - return \HumbugBox380\Composer\Semver\Semver::satisfies($version, $constraints); + return \HumbugBox383\Composer\Semver\Semver::satisfies($version, $constraints); }); return \array_values($versions); } @@ -36,7 +36,7 @@ public static function rsort(array $versions) private static function usort(array $versions, $direction) { if (null === self::$versionParser) { - self::$versionParser = new \HumbugBox380\Composer\Semver\VersionParser(); + self::$versionParser = new \HumbugBox383\Composer\Semver\VersionParser(); } $versionParser = self::$versionParser; $normalized = array(); @@ -47,7 +47,7 @@ private static function usort(array $versions, $direction) if ($left[0] === $right[0]) { return 0; } - if (\HumbugBox380\Composer\Semver\Comparator::lessThan($left[0], $right[0])) { + if (\HumbugBox383\Composer\Semver\Comparator::lessThan($left[0], $right[0])) { return -$direction; } return $direction; diff --git a/.requirement-checker/vendor/composer/semver/src/VersionParser.php b/.requirement-checker/vendor/composer/semver/src/VersionParser.php index 0044a1a7f..6de1d9805 100644 --- a/.requirement-checker/vendor/composer/semver/src/VersionParser.php +++ b/.requirement-checker/vendor/composer/semver/src/VersionParser.php @@ -1,11 +1,11 @@ getConstraints()) && 2 === \count($orGroups[1]->getConstraints()) && ($a = (string) $orGroups[0]) && \substr($a, 0, 3) === '[>=' && \false !== ($posA = \strpos($a, '<', 4)) && ($b = (string) $orGroups[1]) && \substr($b, 0, 3) === '[>=' && \false !== ($posB = \strpos($b, '<', 4)) && \substr($a, $posA + 2, -1) === \substr($b, 4, $posB - 5)) { - $constraint = new \HumbugBox380\Composer\Semver\Constraint\MultiConstraint(array(new \HumbugBox380\Composer\Semver\Constraint\Constraint('>=', \substr($a, 4, $posA - 5)), new \HumbugBox380\Composer\Semver\Constraint\Constraint('<', \substr($b, $posB + 2, -1)))); + } elseif (2 === \count($orGroups) && $orGroups[0] instanceof \HumbugBox383\Composer\Semver\Constraint\MultiConstraint && $orGroups[1] instanceof \HumbugBox383\Composer\Semver\Constraint\MultiConstraint && 2 === \count($orGroups[0]->getConstraints()) && 2 === \count($orGroups[1]->getConstraints()) && ($a = (string) $orGroups[0]) && \substr($a, 0, 3) === '[>=' && \false !== ($posA = \strpos($a, '<', 4)) && ($b = (string) $orGroups[1]) && \substr($b, 0, 3) === '[>=' && \false !== ($posB = \strpos($b, '<', 4)) && \substr($a, $posA + 2, -1) === \substr($b, 4, $posB - 5)) { + $constraint = new \HumbugBox383\Composer\Semver\Constraint\MultiConstraint(array(new \HumbugBox383\Composer\Semver\Constraint\Constraint('>=', \substr($a, 4, $posA - 5)), new \HumbugBox383\Composer\Semver\Constraint\Constraint('<', \substr($b, $posB + 2, -1)))); } else { - $constraint = new \HumbugBox380\Composer\Semver\Constraint\MultiConstraint($orGroups, \false); + $constraint = new \HumbugBox383\Composer\Semver\Constraint\MultiConstraint($orGroups, \false); } $constraint->setPrettyString($prettyConstraint); return $constraint; @@ -160,7 +160,7 @@ private function parseConstraint($constraint) } } if (\preg_match('{^v?[xX*](\\.[xX*])*$}i', $constraint)) { - return array(new \HumbugBox380\Composer\Semver\Constraint\EmptyConstraint()); + return array(new \HumbugBox383\Composer\Semver\Constraint\EmptyConstraint()); } $versionRegex = 'v?(\\d++)(?:\\.(\\d++))?(?:\\.(\\d++))?(?:\\.(\\d++))?' . self::$modifierRegex . '(?:\\+[^\\s]+)?'; if (\preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) { @@ -181,10 +181,10 @@ private function parseConstraint($constraint) $stabilitySuffix .= '-dev'; } $lowVersion = $this->normalize(\substr($constraint . $stabilitySuffix, 1)); - $lowerBound = new \HumbugBox380\Composer\Semver\Constraint\Constraint('>=', $lowVersion); + $lowerBound = new \HumbugBox383\Composer\Semver\Constraint\Constraint('>=', $lowVersion); $highPosition = \max(1, $position - 1); $highVersion = $this->manipulateVersionString($matches, $highPosition, 1) . '-dev'; - $upperBound = new \HumbugBox380\Composer\Semver\Constraint\Constraint('<', $highVersion); + $upperBound = new \HumbugBox383\Composer\Semver\Constraint\Constraint('<', $highVersion); return array($lowerBound, $upperBound); } if (\preg_match('{^\\^' . $versionRegex . '($)}i', $constraint, $matches)) { @@ -200,9 +200,9 @@ private function parseConstraint($constraint) $stabilitySuffix .= '-dev'; } $lowVersion = $this->normalize(\substr($constraint . $stabilitySuffix, 1)); - $lowerBound = new \HumbugBox380\Composer\Semver\Constraint\Constraint('>=', $lowVersion); + $lowerBound = new \HumbugBox383\Composer\Semver\Constraint\Constraint('>=', $lowVersion); $highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev'; - $upperBound = new \HumbugBox380\Composer\Semver\Constraint\Constraint('<', $highVersion); + $upperBound = new \HumbugBox383\Composer\Semver\Constraint\Constraint('<', $highVersion); return array($lowerBound, $upperBound); } if (\preg_match('{^v?(\\d++)(?:\\.(\\d++))?(?:\\.(\\d++))?(?:\\.[xX*])++$}', $constraint, $matches)) { @@ -216,9 +216,9 @@ private function parseConstraint($constraint) $lowVersion = $this->manipulateVersionString($matches, $position) . '-dev'; $highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev'; if ($lowVersion === '0.0.0.0-dev') { - return array(new \HumbugBox380\Composer\Semver\Constraint\Constraint('<', $highVersion)); + return array(new \HumbugBox383\Composer\Semver\Constraint\Constraint('<', $highVersion)); } - return array(new \HumbugBox380\Composer\Semver\Constraint\Constraint('>=', $lowVersion), new \HumbugBox380\Composer\Semver\Constraint\Constraint('<', $highVersion)); + return array(new \HumbugBox383\Composer\Semver\Constraint\Constraint('>=', $lowVersion), new \HumbugBox383\Composer\Semver\Constraint\Constraint('<', $highVersion)); } if (\preg_match('{^(?P' . $versionRegex . ') +- +(?P' . $versionRegex . ')($)}i', $constraint, $matches)) { $lowStabilitySuffix = ''; @@ -226,17 +226,17 @@ private function parseConstraint($constraint) $lowStabilitySuffix = '-dev'; } $lowVersion = $this->normalize($matches['from']); - $lowerBound = new \HumbugBox380\Composer\Semver\Constraint\Constraint('>=', $lowVersion . $lowStabilitySuffix); + $lowerBound = new \HumbugBox383\Composer\Semver\Constraint\Constraint('>=', $lowVersion . $lowStabilitySuffix); $empty = function ($x) { return $x === 0 || $x === '0' ? \false : empty($x); }; if (!$empty($matches[11]) && !$empty($matches[12]) || !empty($matches[14]) || !empty($matches[16])) { $highVersion = $this->normalize($matches['to']); - $upperBound = new \HumbugBox380\Composer\Semver\Constraint\Constraint('<=', $highVersion); + $upperBound = new \HumbugBox383\Composer\Semver\Constraint\Constraint('<=', $highVersion); } else { $highMatch = array('', $matches[10], $matches[11], $matches[12], $matches[13]); $highVersion = $this->manipulateVersionString($highMatch, $empty($matches[11]) ? 1 : 2, 1) . '-dev'; - $upperBound = new \HumbugBox380\Composer\Semver\Constraint\Constraint('<', $highVersion); + $upperBound = new \HumbugBox383\Composer\Semver\Constraint\Constraint('<', $highVersion); } return array($lowerBound, $upperBound); } @@ -252,7 +252,7 @@ private function parseConstraint($constraint) } } } - return array(new \HumbugBox380\Composer\Semver\Constraint\Constraint($matches[1] ?: '=', $version)); + return array(new \HumbugBox383\Composer\Semver\Constraint\Constraint($matches[1] ?: '=', $version)); } catch (\Exception $e) { } }