You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building PHP extension that has ZEND_MOD_CONFLICTS listed in its dependencies, the macro is ineffective when building shared extensions or when conflicting module is registered after such extension.
For example. Suppose we add the following hypothetical change to ext/ctype/ctyp.c (to mark the ext/curl extension as conflicting for the ext/ctype):
Resulted in this output (here no warning is given):
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
...
[Zend Modules]
But I expected this output instead:
Warning: Cannot load module "ctype" because conflicting module "curl" is already loaded in Unknown on line 0
[PHP Modules]
Core
curl
date
dom
fileinfo
filter
...
[Zend Modules]
When extension has conflicting extension(s) listed in ZEND_MOD_CONFLICTS
this now properly emits a warning and doesn't load the extension.
Previously it relied on the sort order of the registered extensions:
- first the statically built extensions based on the
PHP_ADD_EXTENSION_DEP (*nix) or ADD_EXTENSION_DEP (Windows)
listed in the main/internal_functions.c or
main/internal_functions_cli.c.
- then dynamically loaded extensions using the extension=<ext> and
zend_extension=<ext> INI directives.
And it didn't detect conflicting extensions when they were loaded later
in the list or when loaded as shared modules.
Description
When building PHP extension that has
ZEND_MOD_CONFLICTS
listed in its dependencies, the macro is ineffective when building shared extensions or when conflicting module is registered after such extension.For example. Suppose we add the following hypothetical change to ext/ctype/ctyp.c (to mark the ext/curl extension as conflicting for the ext/ctype):
Then building it with:
Resulted in this output (here no warning is given):
But I expected this output instead:
Unlike, when doing:
the warning is displayed and extension is not loaded as it should be done.
PHP Version
All
Operating System
No response
The text was updated successfully, but these errors were encountered: