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

use Symfony\Component\Console\Application;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\Migrations\DependencyFactory;
use Doctrine\Migrations\Tools\Console\Command;

require_once __DIR__ . '/../../../vendor/autoload.php';

// Load Doctrine configuration
$helperSet = require  __DIR__ . '/../cli-config.php';

$application = new Application();

// Set the helper set
$application->setHelperSet($helperSet);

// Add Doctrine ORM commands
ConsoleRunner::addCommands($application);

// Add Doctrine Migrations commands
// $dependencyFactory = require __DIR__ . '/../migrations.php';

// $application->addCommands([
//     new Command\ExecuteCommand($dependencyFactory),
//     new Command\DiffCommand($dependencyFactory),
//     new Command\MigrateCommand($dependencyFactory),
//     new Command\StatusCommand($dependencyFactory),
//     new Command\VersionCommand($dependencyFactory),
// ]);

// Add Doctrine ORM commands (optional)
// $application->add(ConsoleRunner::createHelperSet($application->getHelperSet()->get('entityManager')));


$application->run();
