diff --git a/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist b/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist index c7c03f606..20f932977 100644 --- a/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist +++ b/requirement-checker/fixtures/fail-complete/expected-boxmin-stderr.dist @@ -7,7 +7,7 @@ Box Requirements Checker WARNING: No configuration file (php.ini) used by PHP! > Checking Box requirements: - ✘ The application requires the version "^10" or greater. + ✘ The application requires a version matching "^10". ✔ The application requires the extension "phar". ✔ The package "package-with-extensions" requires the extension "json". ✘ The package "package-with-extensions" requires the extension "ldap". Enable @@ -22,7 +22,7 @@ Enable it or install a polyfill. Fix the following mandatory requirements: ========================================= - * The application requires the version "^10" or greater. + * The application requires a version matching "^10". * The package "package-with-extensions" requires the extension "ldap". Enable it or install a polyfill. * The package "package-with-extensions" requires the extension "random". Enable diff --git a/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist b/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist index c709ce90a..5b97581c0 100644 --- a/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist +++ b/requirement-checker/fixtures/fail-complete/expected-composermin-stderr.dist @@ -7,7 +7,7 @@ Box Requirements Checker WARNING: No configuration file (php.ini) used by PHP! > Checking Box requirements: - ✘ The application requires the version "^10" or greater. + ✘ The application requires a version matching "^10". ✔ The application requires the extension "phar". ✔ The package "package-with-extensions" requires the extension "json". ✘ The package "package-with-extensions" requires the extension "ldap". Enable @@ -22,7 +22,7 @@ Enable it or install a polyfill. Fix the following mandatory requirements: ========================================= - * The application requires the version "^10" or greater. + * The application requires a version matching "^10". * The package "package-with-extensions" requires the extension "ldap". Enable it or install a polyfill. * The package "package-with-extensions" requires the extension "random". Enable diff --git a/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist b/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist index 8ac7b9572..21899bfd7 100644 --- a/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist +++ b/requirement-checker/fixtures/pass-complete/expected-boxmin-stderr.dist @@ -7,7 +7,7 @@ Box Requirements Checker WARNING: No configuration file (php.ini) used by PHP! > Checking Box requirements: - ✔ The application requires the version ">=5.3" or greater. + ✔ The application requires a version matching ">=5.3". ✔ The application requires the extension "phar". diff --git a/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist b/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist index 8ac7b9572..21899bfd7 100644 --- a/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist +++ b/requirement-checker/fixtures/pass-complete/expected-composermin-stderr.dist @@ -7,7 +7,7 @@ Box Requirements Checker WARNING: No configuration file (php.ini) used by PHP! > Checking Box requirements: - ✔ The application requires the version ">=5.3" or greater. + ✔ The application requires a version matching ">=5.3". ✔ The application requires the extension "phar". diff --git a/src/RequirementChecker/AppRequirementsFactory.php b/src/RequirementChecker/AppRequirementsFactory.php index d281a5ed7..f6dfacd98 100644 --- a/src/RequirementChecker/AppRequirementsFactory.php +++ b/src/RequirementChecker/AppRequirementsFactory.php @@ -258,21 +258,21 @@ private static function generatePhpCheckRequirement(string $requiredPhpVersion, 'condition' => $requiredPhpVersion, 'message' => null === $packageName ? sprintf( - 'The application requires the version "%s" or greater.', + 'The application requires a version matching "%s".', $requiredPhpVersion, ) : sprintf( - 'The package "%s" requires the version "%s" or greater.', + 'The package "%s" requires a version matching "%s".', $packageName, $requiredPhpVersion, ), 'helpMessage' => null === $packageName ? sprintf( - 'The application requires the version "%s" or greater.', + 'The application requires a version matching "%s".', $requiredPhpVersion, ) : sprintf( - 'The package "%s" requires the version "%s" or greater.', + 'The package "%s" requires a version matching "%s".', $packageName, $requiredPhpVersion, ), diff --git a/tests/RequirementChecker/AppRequirementsFactoryTest.php b/tests/RequirementChecker/AppRequirementsFactoryTest.php index 6cba0401f..43854e8de 100644 --- a/tests/RequirementChecker/AppRequirementsFactoryTest.php +++ b/tests/RequirementChecker/AppRequirementsFactoryTest.php @@ -168,8 +168,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.1', - 'message' => 'The application requires the version "^7.1" or greater.', - 'helpMessage' => 'The application requires the version "^7.1" or greater.', + 'message' => 'The application requires a version matching "^7.1".', + 'helpMessage' => 'The application requires a version matching "^7.1".', ], [ 'type' => 'extension', @@ -196,8 +196,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.1', - 'message' => 'The application requires the version "^7.1" or greater.', - 'helpMessage' => 'The application requires the version "^7.1" or greater.', + 'message' => 'The application requires a version matching "^7.1".', + 'helpMessage' => 'The application requires a version matching "^7.1".', ], [ 'type' => 'extension', @@ -233,8 +233,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.1', - 'message' => 'The application requires the version "^7.1" or greater.', - 'helpMessage' => 'The application requires the version "^7.1" or greater.', + 'message' => 'The application requires a version matching "^7.1".', + 'helpMessage' => 'The application requires a version matching "^7.1".', ], [ 'type' => 'extension', @@ -261,8 +261,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.1', - 'message' => 'The application requires the version "^7.1" or greater.', - 'helpMessage' => 'The application requires the version "^7.1" or greater.', + 'message' => 'The application requires a version matching "^7.1".', + 'helpMessage' => 'The application requires a version matching "^7.1".', ], [ 'type' => 'extension', @@ -295,8 +295,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.1', - 'message' => 'The application requires the version "^7.1" or greater.', - 'helpMessage' => 'The application requires the version "^7.1" or greater.', + 'message' => 'The application requires a version matching "^7.1".', + 'helpMessage' => 'The application requires a version matching "^7.1".', ], [ 'type' => 'extension', @@ -337,8 +337,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.1', - 'message' => 'The application requires the version "^7.1" or greater.', - 'helpMessage' => 'The application requires the version "^7.1" or greater.', + 'message' => 'The application requires a version matching "^7.1".', + 'helpMessage' => 'The application requires a version matching "^7.1".', ], [ 'type' => 'extension', @@ -501,8 +501,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '>=5.3', - 'message' => 'The application requires the version ">=5.3" or greater.', - 'helpMessage' => 'The application requires the version ">=5.3" or greater.', + 'message' => 'The application requires a version matching ">=5.3".', + 'helpMessage' => 'The application requires a version matching ">=5.3".', ], [ 'type' => 'extension', @@ -574,14 +574,14 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '>=5.3', - 'message' => 'The package "beberlei/assert" requires the version ">=5.3" or greater.', - 'helpMessage' => 'The package "beberlei/assert" requires the version ">=5.3" or greater.', + 'message' => 'The package "beberlei/assert" requires a version matching ">=5.3".', + 'helpMessage' => 'The package "beberlei/assert" requires a version matching ">=5.3".', ], [ 'type' => 'php', 'condition' => '^5.3.2 || ^7.0', - 'message' => 'The package "composer/ca-bundle" requires the version "^5.3.2 || ^7.0" or greater.', - 'helpMessage' => 'The package "composer/ca-bundle" requires the version "^5.3.2 || ^7.0" or greater.', + 'message' => 'The package "composer/ca-bundle" requires a version matching "^5.3.2 || ^7.0".', + 'helpMessage' => 'The package "composer/ca-bundle" requires a version matching "^5.3.2 || ^7.0".', ], [ 'type' => 'extension', @@ -664,14 +664,14 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '>=5.3', - 'message' => 'The package "beberlei/assert" requires the version ">=5.3" or greater.', - 'helpMessage' => 'The package "beberlei/assert" requires the version ">=5.3" or greater.', + 'message' => 'The package "beberlei/assert" requires a version matching ">=5.3".', + 'helpMessage' => 'The package "beberlei/assert" requires a version matching ">=5.3".', ], [ 'type' => 'php', 'condition' => '^5.3.2 || ^7.0', - 'message' => 'The package "composer/ca-bundle" requires the version "^5.3.2 || ^7.0" or greater.', - 'helpMessage' => 'The package "composer/ca-bundle" requires the version "^5.3.2 || ^7.0" or greater.', + 'message' => 'The package "composer/ca-bundle" requires a version matching "^5.3.2 || ^7.0".', + 'helpMessage' => 'The package "composer/ca-bundle" requires a version matching "^5.3.2 || ^7.0".', ], [ 'type' => 'extension', @@ -833,8 +833,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.3', - 'message' => 'The application requires the version "^7.3" or greater.', - 'helpMessage' => 'The application requires the version "^7.3" or greater.', + 'message' => 'The application requires a version matching "^7.3".', + 'helpMessage' => 'The application requires a version matching "^7.3".', ], [ 'type' => 'extension', @@ -895,8 +895,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.3', - 'message' => 'The application requires the version "^7.3" or greater.', - 'helpMessage' => 'The application requires the version "^7.3" or greater.', + 'message' => 'The application requires a version matching "^7.3".', + 'helpMessage' => 'The application requires a version matching "^7.3".', ], [ 'type' => 'extension', @@ -965,8 +965,8 @@ public static function lockContentsProvider(): iterable [ 'type' => 'php', 'condition' => '^7.3', - 'message' => 'The application requires the version "^7.3" or greater.', - 'helpMessage' => 'The application requires the version "^7.3" or greater.', + 'message' => 'The application requires a version matching "^7.3".', + 'helpMessage' => 'The application requires a version matching "^7.3".', ], [ 'type' => 'extension', diff --git a/tests/RequirementChecker/RequirementsDumperTest.php b/tests/RequirementChecker/RequirementsDumperTest.php index c5e13e9b5..3743f135a 100644 --- a/tests/RequirementChecker/RequirementsDumperTest.php +++ b/tests/RequirementChecker/RequirementsDumperTest.php @@ -129,8 +129,8 @@ public static function jsonAndLockContentsProvider(): iterable array ( 'type' => 'php', 'condition' => '^7.4', - 'message' => 'The package "acme/foo" requires the version "^7.4" or greater.', - 'helpMessage' => 'The package "acme/foo" requires the version "^7.4" or greater.', + 'message' => 'The package "acme/foo" requires a version matching "^7.4".', + 'helpMessage' => 'The package "acme/foo" requires a version matching "^7.4".', ), 1 => array (