-
Notifications
You must be signed in to change notification settings - Fork 7.9k
List skipped extensions in run-tests.php #8363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
0f4742d
8f8a708
3647019
43eef20
b401001
8488fcc
0ed4ec5
4a0dfde
447dfe5
7d0f525
1c78850
ce48880
7f85bf6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -877,22 +877,20 @@ function write_information(): void | |||||
$ext_dir = ini_get('extension_dir'); | ||||||
foreach (scandir($ext_dir) as $file) { | ||||||
if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) { | ||||||
// workaround dl('mysqli') fatal error | ||||||
// remove once https://github.com/php/php-src/issues/9196 is fixed | ||||||
// @dl() is fast (about 1 ms / dl() call) | ||||||
if (extension_loaded($matches[1])) { | ||||||
if ($matches[1] === 'mysqli') { | ||||||
continue; | ||||||
} | ||||||
|
||||||
if (dl($matches[1])) { | ||||||
if (@dl($matches[1])) { | ||||||
$exts[] = $matches[1]; | ||||||
$exts[] = microtime(true) - $t; | ||||||
} | ||||||
} | ||||||
} | ||||||
echo implode(',', $exts); | ||||||
PHP); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably "detend" this line:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why? with the new change, the code has (as I would expect) no indentation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am sorry, what do you mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The closing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? The indentation is determined solely by the ending You meant to remove 1 indentation more for whole nowdoc? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, sorry, you're right. The indentation is fine as is. |
||||||
$extensionsNames = explode(',', shell_exec("$php $pass_options $info_params $no_file_cache \"$info_file\"")); | ||||||
print_r($extensionsNames);echo "\nxxxxxx\n\n\n"; | ||||||
$exts_to_test = array_unique(remap_loaded_extensions_names($extensionsNames)); | ||||||
// check for extensions that need special handling and regenerate | ||||||
$info_params_ex = [ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not load
dl()
if theextension_loaded()
, i.e. keep this as it was before.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is (strictly taken, /wo assuming the name) impossible, as the
extension_loaded()
input must be the ext name, not the so/dll filenameas long as the
@dl()
does not end with a fatal error (it should not), what is wrong witch this approach?all non-fatal errors are suppressed as before and this load is done in a separate php process, thus there is no side effect to the main script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for performance. Checking whether the extension is already loaded should be much faster than trying to load it again (especially on Windows). And even if some extension names have different filenames, most names match.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
performance isn't a problem and the data are cached, but I have found a problem in PHP when using Win + ZTS - #9527