|
75 | 75 | }
|
76 | 76 |
|
77 | 77 | $extensions = [
|
78 |
| - 'cURL' => function_exists('curl_init'), |
| 78 | + 'curl' => function_exists('curl_init') |
| 79 | + // Make sure we are not using the default AL2 cURL version (7.79) |
| 80 | + && version_compare(curl_version()['version'], '7.85.0', '>='), |
| 81 | + // https://github.com/brefphp/aws-lambda-layers/issues/42 |
| 82 | + 'curl-http2' => defined('CURL_HTTP_VERSION_2'), |
| 83 | + // Make sure we are not using the default AL2 OpenSSL version (7.79) |
| 84 | + 'curl-openssl' => str_starts_with(curl_version()['ssl_version'], 'OpenSSL/1.1.1'), |
| 85 | + // Make sure we are using curl with our compiled libssh |
| 86 | + 'curl-libssh' => version_compare(str_replace('libssh2/', '', curl_version()['libssh_version']), '1.10.0', '>='), |
79 | 87 | 'json' => function_exists('json_encode'),
|
80 | 88 | 'bcmath' => function_exists('bcadd'),
|
81 | 89 | 'ctype' => function_exists('ctype_digit'),
|
82 |
| - // https://github.com/brefphp/aws-lambda-layers/issues/42 |
83 |
| - 'curl-with-http2' => defined('CURL_HTTP_VERSION_2'), |
84 | 90 | 'dom' => class_exists(\DOMDocument::class),
|
85 | 91 | 'exif' => function_exists('exif_imagetype'),
|
86 | 92 | 'fileinfo' => function_exists('finfo_file'),
|
|
102 | 108 | 'spl' => class_exists(\SplQueue::class),
|
103 | 109 | 'sqlite3' => class_exists(\SQLite3::class),
|
104 | 110 | 'tokenizer' => function_exists('token_get_all'),
|
| 111 | + 'libxml' => function_exists('libxml_get_errors'), |
105 | 112 | 'xml' => function_exists('xml_parse'),
|
106 | 113 | 'xmlreader' => class_exists(\XMLReader::class),
|
107 | 114 | 'xmlwriter' => class_exists(\XMLWriter::class),
|
108 | 115 | 'xsl' => class_exists(\XSLTProcessor::class),
|
109 | 116 | ];
|
| 117 | +$errors = []; |
110 | 118 | foreach ($extensions as $extension => $test) {
|
111 | 119 | if (! $test) {
|
112 |
| - error($extension . ' extension was not loaded'); |
| 120 | + $errors[] = "[Extension] $extension extension was not loaded or failed the test"; |
113 | 121 | }
|
114 | 122 | success("[Extension] $extension");
|
115 | 123 | }
|
| 124 | +if ($errors) { |
| 125 | + errors($errors); |
| 126 | +} |
116 | 127 |
|
117 | 128 | $extensionsDisabledByDefault = [
|
118 | 129 | 'intl' => class_exists(\Collator::class),
|
|
0 commit comments