Skip to content

Commit c9caf70

Browse files
committed
Update ReflectorFactory.php
1 parent d2ade4c commit c9caf70

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/ReflectorFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public static function create(string $cacheDir): QueryReflector
3434
$ssl = false;
3535
$mode = getenv('DBA_MODE') ?: self::MODE_RECORDING;
3636
$reflector = getenv('DBA_REFLECTOR') ?: 'mysqli';
37+
$platform = $_ENV['DBA_PLATFORM'] ?: 'mysql';
3738
} else {
3839
$host = getenv('DBA_HOST') ?: $_ENV['DBA_HOST'];
3940
$user = getenv('DBA_USER') ?: $_ENV['DBA_USER'];
@@ -42,10 +43,12 @@ public static function create(string $cacheDir): QueryReflector
4243
$ssl = (string) (getenv('DBA_SSL') ?: $_ENV['DBA_SSL'] ?? '');
4344
$mode = getenv('DBA_MODE') ?: $_ENV['DBA_MODE'];
4445
$reflector = getenv('DBA_REFLECTOR') ?: $_ENV['DBA_REFLECTOR'];
46+
$platform = $_ENV['DBA_PLATFORM'] ?: $_ENV['DBA_PLATFORM'];
4547
}
4648

4749
// make env vars available to tests, in case non are defined yet
4850
$_ENV['DBA_REFLECTOR'] = $reflector;
51+
$_ENV['DBA_PLATFORM'] = $platform;
4952

5053
// we need to record the reflection information in both, phpunit and phpstan since we are replaying it in both CI jobs.
5154
// in a regular application you will use phpstan-dba only within your phpstan CI job, therefore you only need 1 cache-file.

0 commit comments

Comments
 (0)