This repository was archived by the owner on Nov 14, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-24
lines changed Expand file tree Collapse file tree 2 files changed +13
-24
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
57
57
$ this ->output = $ output ;
58
58
59
59
$ this
60
- ->checkInstalledPhpVersion ()
61
60
->checkProjectName ()
62
61
->checkSymfonyVersionIsInstallable ()
63
62
->download ()
@@ -68,29 +67,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
68
67
;
69
68
}
70
69
71
- /**
72
- * Checks if the system has PHP 5.4 or higher installed, which is a requirement
73
- * to execute the installer.
74
- * @return $this
75
- */
76
- private function checkInstalledPhpVersion ()
77
- {
78
- if (version_compare (PHP_VERSION , '5.4.0 ' , '< ' )) {
79
- throw new \RuntimeException (sprintf (
80
- "Symfony Installer requires PHP 5.4 version or higher and your system has \n" .
81
- "PHP %s version installed. \n\n" .
82
- "To solve this issue, upgrade your PHP installation or install Symfony manually \n" .
83
- "executing the following command: \n\n" .
84
- "composer create-project symfony/framework-standard-edition %s %s " ,
85
- PHP_VERSION ,
86
- $ this ->projectName ,
87
- 'latest ' !== $ this ->version ? $ this ->version : ''
88
- ));
89
- }
90
-
91
- return $ this ;
92
- }
93
-
94
70
/**
95
71
* Checks whether it's safe to create a new project for the given name in the
96
72
* given directory.
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env php
2
2
<?php
3
3
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
+ exit (1 );
15
+ }
16
+
4
17
require file_exists (__DIR__ .'/vendor/autoload.php ' )
5
18
? __DIR__ .'/vendor/autoload.php '
6
19
: __DIR__ .'/../../autoload.php ' ;
You can’t perform that action at this time.
0 commit comments