Skip to content

Commit c173ac0

Browse files
committed
Add console
1 parent 8109d02 commit c173ac0

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
/vendor/
1010
/bin/
1111
!/bin/.gitkeep
12+
!/bin/console
1213
/.idea/

bin/console

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use Symfony\Bundle\FrameworkBundle\Console\Application;
5+
use Symfony\Component\Console\Input\ArgvInput;
6+
use Symfony\Component\Debug\Debug;
7+
8+
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
9+
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
10+
//umask(0000);
11+
12+
set_time_limit(0);
13+
14+
/**
15+
* @var Composer\Autoload\ClassLoader $loader
16+
*/
17+
$loader = require __DIR__.'/../app/autoload.php';
18+
19+
$input = new ArgvInput();
20+
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
21+
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
22+
23+
if ($debug) {
24+
Debug::enable();
25+
}
26+
27+
$kernel = new AppKernel($env, $debug);
28+
$application = new Application($kernel);
29+
$application->run($input);

0 commit comments

Comments
 (0)