forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli
More file actions
executable file
·28 lines (21 loc) · 769 Bytes
/
cli
File metadata and controls
executable file
·28 lines (21 loc) · 769 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
26
27
28
#!/usr/bin/env php
<?php
declare(strict_types=1);
use Doctrine\Migrations\DependencyFactory;
use Doctrine\Migrations\Tools\Console\ConsoleRunner;
use Firehed\Container\TypedContainerInterface;
use Symfony\Component\Console\Application;
$container = require_once __DIR__ . '/bootstrap.php';
assert($container instanceof TypedContainerInterface);
if (php_sapi_name() !== 'cli') {
echo 'This can only be run from the command line.';
exit(1);
}
file_put_contents(
'php://stderr',
"WARNING: This CLI tool is experimental and in progress. You probably want bin/console.\n",
);
$application = new Application();
// Doctrine Migrations integration
ConsoleRunner::addCommands($application, $container->get(DependencyFactory::class));
$application->run();