baleen/bin/doctrine
2024-12-31 16:17:13 +00:00

25 lines
728 B
Plaintext

<?php declare(strict_types=1);
require_once __DIR__ . '/../vendor/autoload.php';
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;
use Lewisdale\App\Models\Repositories\FeedRepository;
use Lewisdale\App\Tools\Console\TestFeed;
$dotenv = Dotenv\Dotenv::createImmutable([__DIR__, __DIR__ . "/.."]);
$dotenv->safeLoad();
require_once __DIR__ . '/../src/dependencies.php';
global $container;
$commands = [
$container->get(TestFeed::class),
$container->get(\Lewisdale\App\Tools\Console\CreateUser::class),
];
ConsoleRunner::run(
new SingleManagerProvider($container->get(EntityManager::class)),
$commands
);