-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.php
51 lines (44 loc) · 946 Bytes
/
test.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types=1);
namespace Mvorisek\Docker\ImagePhp;
$loadedExts = get_loaded_extensions();
$missingExts = array_diff([
'bcmath',
'curl',
'exif',
'gd',
'gmp',
'igbinary',
'imagick',
'imap',
'intl',
'mbstring',
'mysqli',
'mysqlnd',
'oci8',
'openssl',
'pdo_mysql',
'PDO_OCI',
'pdo_pgsql',
'pdo_sqlite',
'pdo_sqlsrv',
'pcntl',
'redis',
'sockets',
'sqlite3',
'tidy',
'xdebug',
'xml',
'xsl',
'Zend OPcache',
'zip',
], $loadedExts);
if (count($missingExts) > 0) {
echo 'TEST FAILED - missing php extensions: ' . implode(', ', $missingExts) . "\n";
exit(1);
}
$xdebugConfPath = '/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini';
if (!file_exists($xdebugConfPath) && in_array('xdebug', $loadedExts, true)) {
echo 'TEST FAILED - missing xdebug configuration: ' . $xdebugConfPath . "\n";
exit(1);
}