-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathbootstrap.php
More file actions
29 lines (22 loc) · 754 Bytes
/
bootstrap.php
File metadata and controls
29 lines (22 loc) · 754 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
<?php
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->debugMode(true);
$config->analyzeQueryPlans(true, 2);
if (false === getenv('GITHUB_ACTION') && false === getenv('DBA_MODE')) {
putenv('DBA_MODE=replay-and-recording');
}
$reflector = ReflectorFactory::create(__DIR__);
QueryReflection::setupReflector(
$reflector,
$config
);