From 279cf174b2f17b00050db9e43a2240f4f1d3ec76 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 3 Dec 2014 17:28:06 +0100 Subject: [PATCH] always show an error message with PHP < 5.4 --- src/Symfony/Installer/NewCommand.php | 24 ------------------------ symfony | 13 +++++++++++++ 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/Symfony/Installer/NewCommand.php b/src/Symfony/Installer/NewCommand.php index 546c4b1..5bf2054 100755 --- a/src/Symfony/Installer/NewCommand.php +++ b/src/Symfony/Installer/NewCommand.php @@ -57,7 +57,6 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->output = $output; $this - ->checkInstalledPhpVersion() ->checkProjectName() ->checkSymfonyVersionIsInstallable() ->download() @@ -68,29 +67,6 @@ protected function execute(InputInterface $input, OutputInterface $output) ; } - /** - * Checks if the system has PHP 5.4 or higher installed, which is a requirement - * to execute the installer. - * @return $this - */ - private function checkInstalledPhpVersion() - { - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - throw new \RuntimeException(sprintf( - "Symfony Installer requires PHP 5.4 version or higher and your system has\n". - "PHP %s version installed.\n\n". - "To solve this issue, upgrade your PHP installation or install Symfony manually\n". - "executing the following command:\n\n". - "composer create-project symfony/framework-standard-edition %s %s", - PHP_VERSION, - $this->projectName, - 'latest' !== $this->version ? $this->version : '' - )); - } - - return $this; - } - /** * Checks whether it's safe to create a new project for the given name in the * given directory. diff --git a/symfony b/symfony index 2dbd7b0..25f5ca4 100755 --- a/symfony +++ b/symfony @@ -1,6 +1,19 @@ #!/usr/bin/env php \n\n", + PHP_VERSION + )); + + exit(1); +} + require file_exists(__DIR__.'/vendor/autoload.php') ? __DIR__.'/vendor/autoload.php' : __DIR__.'/../../autoload.php';