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

Commit 879b954

Browse files
committed
Detect dev/beta versions and provide appropriate instruction
1 parent f49d032 commit 879b954

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Installer/NewCommand.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,15 @@ protected function checkSymfonyVersionIsInstallable()
182182
));
183183
}
184184

185+
if (preg_match('/^(\d\.\d).*-(dev|beta)\d*$/', $this->version, $matches)) {
186+
throw new \RuntimeException(sprintf(
187+
"You are trying to install an unstable version (%s).\n".
188+
"Please use composer to install such versions:\n\n".
189+
"composer create-project symfony/framework-standard-edition %s \"%s.*\" --stability=%s",
190+
$this->version, $this->projectDir, $matches[1], $matches[2]
191+
));
192+
}
193+
185194
return $this;
186195
}
187196

0 commit comments

Comments
 (0)