forked from symfony/symfony-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
symfony
executable file
·36 lines (28 loc) · 1.13 KB
/
symfony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env php
<?php
if (PHP_VERSION_ID < 50400) {
file_put_contents('php://stderr', 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 <project-name> <symfony-version>\n\n",
PHP_VERSION
));
exit(1);
}
require file_exists(__DIR__.'/vendor/autoload.php')
? __DIR__.'/vendor/autoload.php'
: __DIR__.'/../../autoload.php';
$appVersion = '1.1.5';
// Windows uses Path instead of PATH
if (!isset($_SERVER['PATH']) && isset($_SERVER['Path'])) {
$_SERVER['PATH'] = $_SERVER['Path'];
}
$app = new Symfony\Component\Console\Application('Symfony Installer', $appVersion);
$app->add(new Symfony\Installer\AboutCommand($appVersion));
$app->add(new Symfony\Installer\NewCommand());
$app->add(new Symfony\Installer\DemoCommand());
$app->add(new Symfony\Installer\SelfUpdateCommand());
$app->setDefaultCommand('about');
$app->run();