Skip to content

Commit 10e35b4

Browse files
authored
Merge pull request #48 from symfony/add-newest-symfony-versions
Add newest PHP versions
2 parents cf8893f + c195b8a commit 10e35b4

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010-2020 Fabien Potencier
1+
Copyright (c) 2010-present Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

composer.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,5 @@
1818
],
1919
"autoload": {
2020
"psr-4": { "Symfony\\Requirements\\": "src/" }
21-
},
22-
"extra": {
23-
"branch-alias": {
24-
"dev-main": "2.0.x-dev"
25-
}
2621
}
2722
}

src/ProjectRequirements.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class ProjectRequirements extends RequirementCollection
2323
const REQUIRED_PHP_VERSION_3x = '5.5.9';
2424
const REQUIRED_PHP_VERSION_4x = '7.1.3';
2525
const REQUIRED_PHP_VERSION_5x = '7.2.9';
26+
const REQUIRED_PHP_VERSION_6x = '8.1.0';
27+
const REQUIRED_PHP_VERSION_7x = '8.2.0';
2628

2729
public function __construct($rootDir)
2830
{
@@ -37,12 +39,16 @@ public function __construct($rootDir)
3739
$rootDir = $this->getComposerRootDir($rootDir);
3840
$options = $this->readComposer($rootDir);
3941

40-
$phpVersion = self::REQUIRED_PHP_VERSION_3x;
42+
$phpVersion = self::REQUIRED_PHP_VERSION_7x;
4143
if (null !== $symfonyVersion) {
42-
if (version_compare($symfonyVersion, '5.0.0', '>=')) {
44+
if (version_compare($symfonyVersion, '6.0.0', '>=')) {
45+
$phpVersion = self::REQUIRED_PHP_VERSION_6x;
46+
} elseif (version_compare($symfonyVersion, '5.0.0', '>=')) {
4347
$phpVersion = self::REQUIRED_PHP_VERSION_5x;
4448
} elseif (version_compare($symfonyVersion, '4.0.0', '>=')) {
4549
$phpVersion = self::REQUIRED_PHP_VERSION_4x;
50+
} elseif (version_compare($symfonyVersion, '3.0.0', '>=')) {
51+
$phpVersion = self::REQUIRED_PHP_VERSION_3x;
4652
}
4753
}
4854

0 commit comments

Comments
 (0)