-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli-config.php
More file actions
25 lines (19 loc) · 898 Bytes
/
cli-config.php
File metadata and controls
25 lines (19 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Symfony\Component\Console\Input\ArrayInput;
use Tapestry\Console\DefaultInputDefinition;
use Tapestry\Entities\Configuration;
use Tapestry\Tapestry;
// replace with file to your own project bootstrap
require_once 'vendor/autoload.php';
$definitions = new DefaultInputDefinition();
$tapestry = new Tapestry(new ArrayInput([
'--site-dir' => __DIR__ . DIRECTORY_SEPARATOR . 'mock_project',
'--env' => 'cli-config'
], $definitions));
$tapestry->register(\TapestryCloud\Database\ServiceProvider::class);
/** @var Configuration $configuration */
$configuration = $tapestry->getContainer()->get(Configuration::class);
$configuration->merge(include __DIR__ . '/tests/mock_project/config.php');
return ConsoleRunner::createHelperSet($tapestry->getContainer()->get(EntityManagerInterface::class));