You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 14, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: src/Symfony/Installer/NewCommand.php
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ protected function checkSymfonyVersionIsInstallable()
113
113
114
114
// validate semver syntax
115
115
if (!preg_match('/^2\.\d(?:\.\d{1,2})?(-(dev|BETA)\d*)?$/', $this->version)) {
116
-
thrownew \RuntimeException('The Symfony version should be 2.N or 2.N.M, where N = 0..9 and M = 0..99.');
116
+
thrownew \RuntimeException('The Symfony version should be 2.N or 2.N.M, where N = 0..9 and M = 0..99. The special "-dev" or "-BETA" suffixes are also supported.');
117
117
}
118
118
119
119
if (preg_match('/^2\.\d$/', $this->version)) {
@@ -171,8 +171,20 @@ protected function checkSymfonyVersionIsInstallable()
171
171
));
172
172
}
173
173
174
+
// "-dev" versions are not supported because Symfony doesn't provide packages for them
175
+
if (preg_match('/^.*\-dev$/', $this->version)) {
176
+
thrownew \RuntimeException(sprintf(
177
+
"The selected version (%s) cannot be installed because it hasn't\n".
178
+
"been published as a package yet. Read the following article for\n".
179
+
"an alternative installation method:\n\n".
180
+
"> How to Install or Upgrade to the Latest, Unreleased Symfony Version\n".
0 commit comments