-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathbootstrap.php
More file actions
31 lines (23 loc) · 772 Bytes
/
bootstrap.php
File metadata and controls
31 lines (23 loc) · 772 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
29
30
31
<?php
declare(strict_types=1);
use Dotenv\Dotenv;
use staabm\PHPStanDba\QueryReflection\QueryReflection;
use staabm\PHPStanDba\QueryReflection\RuntimeConfiguration;
use staabm\PHPStanDba\Tests\ReflectorFactory;
require_once __DIR__ . '/vendor/autoload.php';
if (false === getenv('GITHUB_ACTION')) {
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
}
$config = RuntimeConfiguration::create();
$config->errorMode(RuntimeConfiguration::ERROR_MODE_EXCEPTION);
$config->utilizeSqlAst(true);
$config->debugMode(true);
if (false === getenv('GITHUB_ACTION') && false === getenv('DBA_MODE')) {
putenv('DBA_MODE=replay-and-recording');
}
$reflector = ReflectorFactory::create(__DIR__);
QueryReflection::setupReflector(
$reflector,
$config
);