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

Commit 9e41335

Browse files
committed
Updated the version parser regular expression
1 parent b26b217 commit 9e41335

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Installer/NewCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ protected function checkSymfonyVersionIsInstallable()
111111
}
112112

113113
// validate semver syntax
114-
if (!preg_match('/^2\.\d(?:\.\d{1,2})?(?:-(?:dev|BETA\d*|RC\d*))?$/i', $this->version)) {
115-
throw new \RuntimeException('The Symfony version should be 2.N or 2.N.M, where N = 0..9 and M = 0..99. The special "-dev" "-BETA" and "-RC" suffixes are also supported.');
114+
if (!preg_match('/^2\.\d(?:\.\d{1,2})?|2\.\d(?:-(?:dev|BETA\d*|RC\d*))$/i', $this->version)) {
115+
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

118118
if (preg_match('/^2\.\d$/', $this->version)) {

0 commit comments

Comments
 (0)