Skip to content

Commit 056d8c5

Browse files
committed
Add console
1 parent b746526 commit 056d8c5

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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 https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
10+
// for more information
11+
//umask(0000);
12+
13+
set_time_limit(0);
14+
15+
require __DIR__.'/../vendor/autoload.php';
16+
17+
$input = new ArgvInput();
18+
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
19+
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
20+
21+
if ($debug) {
22+
Debug::enable();
23+
}
24+
25+
$kernel = new AppKernel($env, $debug);
26+
$application = new Application($kernel);
27+
$application->run($input);

0 commit comments

Comments
 (0)