-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f502207
commit 2e72b5a
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony-Util package. | ||
* | ||
* (c) Jean-Bernard Addor | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\Debug\Debug; | ||
|
||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line | ||
// read http://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup | ||
// for more information | ||
//umask(0000); | ||
|
||
set_time_limit(0); | ||
|
||
chdir(dirname($argv[0])); | ||
|
||
require '../vendor/autoload.php'; | ||
require '../'.getenv('KERNEL_DIR').'/AppKernel.php'; | ||
|
||
$input = new ArgvInput(); | ||
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); | ||
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; | ||
|
||
if ($debug) { | ||
Debug::enable(); | ||
} | ||
|
||
$kernel = new AppKernel($env, $debug); | ||
$application = new Application($kernel); | ||
// $application->addCommands( ... ); | ||
$application->run($input); |