1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | use Doctrine\DBAL\DriverManager; |
||
6 | |||
7 | static function () : void { |
||
8 | // workaround for https://bugs.php.net/bug.php?id=77120 |
||
9 | DriverManager::getConnection([ |
||
10 | 'driver' => 'oci8', |
||
11 | 'host' => 'oracle-xe-11', |
||
12 | 'user' => 'ORACLE', |
||
13 | 'password' => 'ORACLE', |
||
14 | 'dbname' => 'XE', |
||
15 | ])->query('ALTER USER ORACLE IDENTIFIED BY ORACLE'); |
||
16 | |||
17 | $pos = array_search('--coverage-clover', $_SERVER['argv'], true); |
||
18 | |||
19 | if ($pos === false) { |
||
20 | return; |
||
21 | } |
||
22 | |||
23 | assert(is_int($pos)); |
||
24 | |||
25 | $file = $_SERVER['argv'][$pos + 1]; |
||
26 | |||
27 | register_shutdown_function(static function () use ($file) : void { |
||
28 | $cmd = 'wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar' |
||
29 | . ' && php ocular.phar code-coverage:upload --format=php-clover ' . escapeshellarg($file); |
||
30 | |||
31 | passthru($cmd); |
||
32 | }); |
||
33 | }(); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
34 |