* initial commit
This commit is contained in:
22
bin/automatique
Executable file
22
bin/automatique
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use Interop\Container\ContainerInterface;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
|
||||
|
||||
/** @var ContainerInterface $container */
|
||||
$container = require __DIR__ . '/../config/container.php';
|
||||
/** @var Application $application */
|
||||
$application = $container->get(Application::class);
|
||||
|
||||
$commands = $container->get('config')['console']['commands'];
|
||||
foreach ($commands as $command) {
|
||||
$application->add($container->get($command));
|
||||
}
|
||||
$lazyCommands = $container->get('config')['console']['lazy_commands'];
|
||||
$lazyLoader = new ContainerCommandLoader($container, $lazyCommands);
|
||||
$application->setCommandLoader($lazyLoader);
|
||||
$application->run();
|
||||
Reference in New Issue
Block a user