-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli.php
36 lines (27 loc) · 960 Bytes
/
cli.php
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
29
30
31
32
33
34
35
36
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
// disable xdebug thingy
ini_set('xdebug.remote_autostart', false);
ini_set('xdebug.remote_enable', false);
ini_set('xdebug.profiler_enable', false);
ini_set('xdebug.var_display_max_children', -1);
ini_set('xdebug.var_display_max_data', -1);
ini_set('xdebug.var_display_max_depth', -1);
// this is needed to regex larger lines
if (!empty(getenv('MYFORMER_PCRE_BACKTRACK_LIMIT'))) {
ini_set('pcre.backtrack_limit', getenv('MYFORMER_PCRE_BACKTRACK_LIMIT'));
} else {
ini_set('pcre.backtrack_limit', 1024 * 1024 * 10);
}
require_once __DIR__ . '/vendor/autoload.php';
use App\Commands\TransformCommand;
use Symfony\Component\Console\Application;
if (file_exists(__DIR__ . '/version.txt')) {
$version = rtrim(file_get_contents(__DIR__ . '/version.txt'));
} else {
$version = 'dev';
}
$app = new Application('myformer', $version);
$app->add(new TransformCommand);
$app->run();