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
The documentation on php.net doesn't go into much detail beyond simple tasks in my experience. best practices for config.m4/config.w32 aren't documented beyond a single example.
(If one runs into issues, the main resources are PHP's own extensions and other third party code (and maybe mailing lists?))
Miscellaneous thoughts:
Document how to create modules depending on other modules (for shared and static builds) (e.g. via example)
The config.m4 macros could be explained somewhere in greater detail (E.g. hyperlink to acinclude.m4 source and mention that it has documentation for ADD_EXTENSION_DEP, etc. The book mentions acinclude.m4 exists, but not that it has documentation)
That example doesn't include ADD_EXTENSION_DEP (I haven't seen any php.net examples that mention ADD_EXTENSION_DEP, in the "Documentation" tab)
One thing that the php.net link lacks is details on how to properly create third party extensions that have optional dependencies on other built in/third party extensions. (e.g. which folders to check for shared or static builds in config.m4, etc).
(Is ADD_EXTENSION_DEP() on its own sufficient for an optional dependency? To check if an optional dependency exists, is code supposed to check the result of HAVE_EXTNAME macro)
Another section where a second extension conditionally depends on the first extension may be useful.
Could link to relevant examples of config.m4/config.w32 from php-src/ext, to give developers a real application of macros?
Other notes.
Documenting ADD_EXTENSION_DEP may be more appropriate as a task for php.net documentation, or both
Some of these issues I've had are specific to me and work on igbinary, possibly not broadly applicable (e.g. where would one look for headers in config.m4 so that an extension dependency would work in both a shared/static build (e.g. finding apcu headers from igbinary's config.m4)
The text was updated successfully, but these errors were encountered:
"Document and describe how to extend the language with extensions." is mentioned as one of the goals (not sure of plans). The current php.net documentation is sparse in some places(e.g. https://secure.php.net/manual/en/internals2.buildsys.configunix.php is the best resource for config.m4, but https://secure.php.net/manual/en/internals2.faq.php is just a placeholder)
The documentation on php.net doesn't go into much detail beyond simple tasks in my experience. best practices for config.m4/config.w32 aren't documented beyond a single example.
(If one runs into issues, the main resources are PHP's own extensions and other third party code (and maybe mailing lists?))
Miscellaneous thoughts:
http://www.phpinternalsbook.com/php7/extensions_design/extension_skeleton.html and http://www.phpinternalsbook.com/php7/extensions_design/zend_extensions.html#practice-my-first-example-zend-extension don't go into much detail about config.m4 and config.w32 (or how to modify them if your extension has conditional build arguments) (link to https://secure.php.net/manual/en/internals2.buildsys.configunix.php ?)
The config.m4 macros could be explained somewhere in greater detail (E.g. hyperlink to acinclude.m4 source and mention that it has documentation for ADD_EXTENSION_DEP, etc. The book mentions acinclude.m4 exists, but not that it has documentation)
That example doesn't include ADD_EXTENSION_DEP (I haven't seen any php.net examples that mention ADD_EXTENSION_DEP, in the "Documentation" tab)
One thing that the php.net link lacks is details on how to properly create third party extensions that have optional dependencies on other built in/third party extensions. (e.g. which folders to check for shared or static builds in config.m4, etc).
(Is ADD_EXTENSION_DEP() on its own sufficient for an optional dependency? To check if an optional dependency exists, is code supposed to check the result of HAVE_EXTNAME macro)
Another section where a second extension conditionally depends on the first extension may be useful.
Other notes.
The text was updated successfully, but these errors were encountered: