#!/usr/bin/env php
<?php

require dirname(__DIR__).'/vendor/autoload.php';

use Symfony\Component\Console\Application;
use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

// Create a container builder and configure it
$container = new ContainerBuilder();
$container->addCompilerPass(new \Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterCommandsPass());
$container->compile();

$application = new Application();
$application->setCommandLoader(new ContainerCommandLoader($container, []));  // Assuming commands are loaded from the container

$application->run();
