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

Commit f73b7fb

Browse files
author
Christian Flothmann
committed
always show an error message with PHP < 5.4
1 parent b6c8d65 commit f73b7fb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

symfony

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#!/usr/bin/env php
22
<?php
33

4+
if (PHP_VERSION_ID < 50400) {
5+
file_put_contents('php://stderr', sprintf(
6+
"Symfony Installer requires PHP 5.4 version or higher and your system has\n".
7+
"PHP %s version installed.\n\n".
8+
"To solve this issue, upgrade your PHP installation or install Symfony manually\n".
9+
"executing the following command:\n\n".
10+
"composer create-project symfony/framework-standard-edition <project-name> <symfony-version>\n\n",
11+
PHP_VERSION
12+
));
13+
14+
return;
15+
}
16+
417
require file_exists(__DIR__.'/vendor/autoload.php')
518
? __DIR__.'/vendor/autoload.php'
619
: __DIR__.'/../../autoload.php';

0 commit comments

Comments
 (0)