Skip to content

Instantly share code, notes, and snippets.

@alherd-by
Created November 18, 2016 09:01
Show Gist options
  • Save alherd-by/58c065d04899a84140b4558791b2d042 to your computer and use it in GitHub Desktop.
Save alherd-by/58c065d04899a84140b4558791b2d042 to your computer and use it in GitHub Desktop.
<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../app/autoload.php';
require_once __DIR__ . '/../app/AppKernel.php';
$kernel = new AppKernel('test', true);
$kernel->boot();
try {
$container = $kernel->getContainer();
$application = new Application($kernel);
$application->setAutoExit(false);
$input = new ArrayInput(['command' => 'app:fresh']);
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
$application->run($input, $output);
} catch (\Throwable $e) {
echo $e->getMessage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment