From d578a6f7728577665fcebc5b36abf19499bea902 Mon Sep 17 00:00:00 2001 From: Antoine Makdessi Date: Fri, 20 Feb 2015 16:33:00 +0100 Subject: [PATCH 1/2] Allow last LTS version to be installed. --- src/Symfony/Installer/AboutCommand.php | 5 +++++ src/Symfony/Installer/NewCommand.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/Symfony/Installer/AboutCommand.php b/src/Symfony/Installer/AboutCommand.php index f63e2b5..5f1fbc4 100644 --- a/src/Symfony/Installer/AboutCommand.php +++ b/src/Symfony/Installer/AboutCommand.php @@ -54,6 +54,11 @@ protected function execute(InputInterface $input, OutputInterface $output) %s new blog + To create a new project called blog in the current directory using + the long term support version of Symfony, execute the following command: + + %s new blog lts + To base your project on a specific Symfony branch, append the branch number at the end of the command: diff --git a/src/Symfony/Installer/NewCommand.php b/src/Symfony/Installer/NewCommand.php index 472c2a9..204153c 100755 --- a/src/Symfony/Installer/NewCommand.php +++ b/src/Symfony/Installer/NewCommand.php @@ -137,6 +137,11 @@ private function checkSymfonyVersionIsInstallable() return $this; } + // 'lts' is a special version name that refers to the current long term support version + if ('lts' === $this->version) { + return $this; + } + // validate server syntax if (!preg_match('/^2\.\d(?:\.\d{1,2})?$/', $this->version)) { throw new \RuntimeException('The Symfony version should be 2.N or 2.N.M, where N = 0..9 and M = 0..99'); From 0342e7cff45e7012d5c19975ec0938cafc2a75c8 Mon Sep 17 00:00:00 2001 From: Antoine Makdessi Date: Fri, 20 Feb 2015 17:20:01 +0100 Subject: [PATCH 2/2] Update installer instruction with LTS feature --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6d68e7..d6f350a 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,21 @@ $ symfony new my_project $ php symfony.phar new my_project ``` -**2. Start a new project based on a specific Symfony branch** +**2. Start a new project with the latest Symfony LTS version** + +Execute the `new` command and provide the name of your project as the first +argument and `lts` as the second argument. The installer will automatically +select the most recent LTS version available: + +```bash +# Linux, Mac OS X +$ symfony new my_project lts + +# Windows +$ php symfony.phar new my_project lts +``` + +**3. Start a new project based on a specific Symfony branch** Execute the `new` command and provide the name of your project as the first argument and the branch number as the second argument. The installer will @@ -59,7 +73,7 @@ $ symfony new my_project 2.3 $ php symfony.phar new my_project 2.3 ``` -**3. Start a new project based on a specific Symfony version** +**4. Start a new project based on a specific Symfony version** Execute the `new` command and provide the name of your project as the first argument and the exact Symfony version as the second argument: