Skip to content

Commit

Permalink
build: Update the RequirementChecker (#1144)
Browse files Browse the repository at this point in the history
Update the RequirementChecker

Co-authored-by: theofidry <[email protected]>
  • Loading branch information
github-actions[bot] and theofidry authored Nov 4, 2023
1 parent 1e10a1e commit 2fe6e1b
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions res/requirement-checker/src/Checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use InvalidArgumentException;
use function count;
use function sprintf;
/** @internal */
final class Checker
{
private static $requirementsConfig;
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/IO.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use function stream_isatty;
use const DIRECTORY_SEPARATOR;
use const STDOUT;
/** @internal */
final class IO
{
public const VERBOSITY_QUIET = 16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace HumbugBox450\KevinGH\RequirementChecker;

use function extension_loaded;
/** @internal */
final class IsExtensionConflictFulfilled implements IsFulfilled
{
private $conflictingExtension;
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/IsExtensionFulfilled.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace HumbugBox450\KevinGH\RequirementChecker;

use function extension_loaded;
/** @internal */
final class IsExtensionFulfilled implements IsFulfilled
{
private $requiredExtension;
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/IsFulfilled.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare (strict_types=1);
namespace HumbugBox450\KevinGH\RequirementChecker;

/** @internal */
interface IsFulfilled
{
public function __invoke() : bool;
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/IsPhpVersionFulfilled.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use const PHP_MAJOR_VERSION;
use const PHP_MINOR_VERSION;
use const PHP_RELEASE_VERSION;
/** @internal */
final class IsPhpVersionFulfilled implements IsFulfilled
{
private $requiredPhpVersion;
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use function trim;
use function wordwrap;
use const PHP_EOL;
/** @internal */
final class Printer
{
private $styles = ['reset' => "\x1b[0m", 'red' => "\x1b[31m", 'green' => "\x1b[32m", 'yellow' => "\x1b[33m", 'title' => "\x1b[33m", 'error' => "\x1b[37;41m", 'success' => "\x1b[30;42m"];
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/Requirement.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare (strict_types=1);
namespace HumbugBox450\KevinGH\RequirementChecker;

/** @internal */
final class Requirement
{
private $checkIsFulfilled;
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/RequirementCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Traversable;
use function count;
use function get_cfg_var;
/** @internal */
final class RequirementCollection implements IteratorAggregate, Countable
{
private $requirements = [];
Expand Down
1 change: 1 addition & 0 deletions res/requirement-checker/src/Terminal.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use function stream_get_contents;
use function trim;
use const DIRECTORY_SEPARATOR;
/** @internal */
class Terminal
{
private static $width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use HumbugBox450\Composer\Autoload\ClassLoader;
use HumbugBox450\Composer\Semver\VersionParser;
/** @internal */
class InstalledVersions
{
/**
Expand All @@ -27,7 +28,7 @@ public static function getInstalledPackages()
if (1 === \count($packages)) {
return $packages[0];
}
return \array_keys(\array_flip(\call_user_func_array('array_merge', $packages)));
return \array_keys(\array_flip(\call_user_func_array('HumbugBox450\\array_merge', $packages)));
}
/**
@psalm-return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace HumbugBox450\Composer\Semver;

use HumbugBox450\Composer\Semver\Constraint\Constraint;
/** @internal */
class Comparator
{
public static function greaterThan($version1, $version2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use HumbugBox450\Composer\Semver\Constraint\Constraint;
use HumbugBox450\Composer\Semver\Constraint\ConstraintInterface;
/** @internal */
class CompilingMatcher
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace HumbugBox450\Composer\Semver\Constraint;

/** @internal */
class Bound
{
private $version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace HumbugBox450\Composer\Semver\Constraint;

/** @internal */
class Constraint implements ConstraintInterface
{
const OP_EQ = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace HumbugBox450\Composer\Semver\Constraint;

/** @internal */
interface ConstraintInterface
{
public function matches(ConstraintInterface $provider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace HumbugBox450\Composer\Semver\Constraint;

/** @internal */
class MatchAllConstraint implements ConstraintInterface
{
protected $prettyString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace HumbugBox450\Composer\Semver\Constraint;

/** @internal */
class MatchNoneConstraint implements ConstraintInterface
{
protected $prettyString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace HumbugBox450\Composer\Semver\Constraint;

/** @internal */
class MultiConstraint implements ConstraintInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace HumbugBox450\Composer\Semver;

use HumbugBox450\Composer\Semver\Constraint\Constraint;
/** @internal */
class Interval
{
private $start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use HumbugBox450\Composer\Semver\Constraint\MatchAllConstraint;
use HumbugBox450\Composer\Semver\Constraint\MatchNoneConstraint;
use HumbugBox450\Composer\Semver\Constraint\MultiConstraint;
/** @internal */
class Intervals
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace HumbugBox450\Composer\Semver;

use HumbugBox450\Composer\Semver\Constraint\Constraint;
/** @internal */
class Semver
{
const SORT_ASC = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use HumbugBox450\Composer\Semver\Constraint\MatchAllConstraint;
use HumbugBox450\Composer\Semver\Constraint\MultiConstraint;
use HumbugBox450\Composer\Semver\Constraint\Constraint;
/** @internal */
class VersionParser
{
private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\\d+)*+)?)?([.-]?dev)?';
Expand Down

0 comments on commit 2fe6e1b

Please sign in to comment.