shlink/config/cli-config.php

31 lines
853 B
PHP
Raw Normal View History

2016-04-17 21:27:24 +03:00
<?php
2019-10-05 18:26:10 +03:00
2017-10-12 11:13:20 +03:00
declare(strict_types=1);
use Doctrine\Migrations\Configuration\EntityManager\ExistingEntityManager;
use Doctrine\Migrations\Configuration\Migration\ConfigurationArray;
use Doctrine\Migrations\DependencyFactory;
2016-04-17 21:27:24 +03:00
use Doctrine\ORM\EntityManager;
2023-07-01 17:33:52 +03:00
// This file is currently used by doctrine migrations only
2016-04-17 21:27:24 +03:00
return (static function () {
/** @var EntityManager $em */
$em = include __DIR__ . '/entity-manager.php';
$migrationsConfig = [
'migrations_paths' => [
'ShlinkMigrations' => 'data/migrations',
],
'table_storage' => [
'table_name' => 'migrations',
],
'custom_template' => 'data/migrations_template.txt',
];
return DependencyFactory::fromEntityManager(
new ConfigurationArray($migrationsConfig),
new ExistingEntityManager($em),
);
2019-10-05 18:26:10 +03:00
})();