8000 Merge pull request #537 from symfony-cli/check-requirement-update · symfony-cli/symfony-cli@8030089 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8030089

Browse files
authored
Merge pull request #537 from symfony-cli/check-requirement-update
Update check-requirements.php script to v2.0.2
2 parents 4c51f18 + 8d0bae9 commit 8030089

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

commands/data/check-requirements.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ class ProjectRequirements extends RequirementCollection
372372
const REQUIRED_PHP_VERSION_3x = '5.5.9';
373373
const REQUIRED_PHP_VERSION_4x = '7.1.3';
374374
const REQUIRED_PHP_VERSION_5x = '7.2.9';
375+
const REQUIRED_PHP_VERSION_6x = '8.1.0';
376+
const REQUIRED_PHP_VERSION_7x = '8.2.0';
375377

376378
public function __construct($rootDir)
377379
{
@@ -386,12 +388,16 @@ public function __construct($rootDir)
386388
$rootDir = $this->getComposerRootDir($rootDir);
387389
$options = $this->readComposer($rootDir);
388390

389-
$phpVersion = self::REQUIRED_PHP_VERSION_3x;
391+
$phpVersion = self::REQUIRED_PHP_VERSION_7x;
390392
if (null !== $symfonyVersion) {
391-
if (version_compare($symfonyVersion, '5.0.0', '>=')) {
393+
if (version_compare($symfonyVersion, '6.0.0', '>=')) {
394+
$phpVersion = self::REQUIRED_PHP_VERSION_6x;
395+
} elseif (version_compare($symfonyVersion, '5.0.0', '>=')) {
392396
$phpVersion = self::REQUIRED_PHP_VERSION_5x;
393397
} elseif (version_compare($symfonyVersion, '4.0.0', '>=')) {
394398
$phpVersion = self::REQUIRED_PHP_VERSION_4x;
399+
} elseif (version_compare($symfonyVersion, '3.0.0', '>=')) {
400+
$phpVersion = self::REQUIRED_PHP_VERSION_3x;
395401
}
396402
}
397403

0 commit comments

Comments
 (0)
0