Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit f45a29a

Browse files
committed
Fixed again the version parser regexp
1 parent 165813c commit f45a29a

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/Symfony/Installer/NewCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function checkSymfonyVersionIsInstallable()
111111
}
112112

113113
// validate semver syntax
114-
if (!preg_match('/^2\.\d(?:\.\d{1,2})?|2\.\d(?:-(?:dev|BETA\d*|RC\d*))$/i', $this->version)) {
114+
if (!preg_match('/^2\.\d(?:\.\d{1,2})?(?:-(?:dev|BETA\d*|RC\d*))?$/i', $this->version)) {
115115
throw new \RuntimeException('The Symfony version must be 2.N or 2.N.M (where N and M are positive integers). The special "-dev", "-BETA" and "-RC" versions are also supported.');
116116
}
117117

tests/Symfony/Installer/Tests/IntegrationTest.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,9 @@ public function provideSymfonyInstallationData()
109109

110110
array(
111111
'2.7-BETA1',
112-
'/.*Symfony 2\.7\-BETA1 was successfully installed.*/',
112+
'/.*Symfony 2\.7\.0\-BETA1 was successfully installed.*/',
113113
'/Symfony version 2\.7\-BETA1 - app\/dev\/debug/',
114114
),
115-
116-
array(
117-
'2.7-RC1',
118-
'/.*Symfony 2\.7\-RC1 was successfully installed.*/',
119-
'/Symfony version 2\.7\-RC1 - app\/dev\/debug/',
120-
),
121115
);
122116
}
123117
}

0 commit comments

Comments
 (0)