Skip to content

Instantly share code, notes, and snippets.

@bazo
Created January 13, 2016 13:57
Show Gist options
  • Save bazo/0c36a512516b7991890a to your computer and use it in GitHub Desktop.
Save bazo/0c36a512516b7991890a to your computer and use it in GitHub Desktop.
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Application;
// Let bootstrap create Dependency Injection container.
$configurator = require __DIR__ . '/app/bootstrap.php';
$configurator->addConfig(__DIR__ . '/app/config/console.neon');
$container = $configurator->createContainer();
// Run console
if (PHP_SAPI === 'cli') {
$container->getByType(Application::class)->run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment