Thanks to visit codestin.com
Credit goes to github.com

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

Commit ecad998

Browse files
committed
bug #6 Fix version validation rule to use full-matching (fivestar)
This PR was squashed before being merged into the 1.0-dev branch (closes #6). Discussion ---------- Fix version validation rule to use full-matching Currently: ``` % symfony new blog/ a2.2.5 Downloading Symfony... [GuzzleHttp\Exception\ClientException] Client error response [url] http://get.symfony.com/Symfony_Standard_Vendors_a2.2.5.zip [status code] 403 [reason phrase] Forbidden new name [version] ``` After fixed: ``` % symfony new blog/ a2.2.5 [RuntimeException] The Symfony version should be 2.N.M, where N = 0..9 and M = 0..99 new name [version] ``` Commits ------- b0d17a8 Fix version validation rule to use full-matching
2 parents 9e4d186 + b0d17a8 commit ecad998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Installer/NewCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
4646
}
4747

4848
$symfonyVersion = $input->getArgument('version');
49-
if (!preg_match('/2\.\d\.\d+/', $symfonyVersion)) {
49+
if (!preg_match('/^2\.\d\.\d+$/', $symfonyVersion)) {
5050
throw new \RuntimeException("The Symfony version should be 2.N.M, where N = 0..9 and M = 0..99");
5151
}
5252

0 commit comments

Comments
 (0)