no-framework-tutorial/implementation/15-adding-content/cli-config.php

14 lines
493 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Lubian\NoFramework\Factory\FileSystemSettingsProvider;
use Lubian\NoFramework\Factory\SettingsContainerProvider;
$settingsProvider = new FileSystemSettingsProvider(__DIR__ . '/config/settings.php');
$container = (new SettingsContainerProvider($settingsProvider))->getContainer();
return ConsoleRunner::createHelperSet($container->get(EntityManagerInterface::class));