Skip to content

Extension Installer Development

c9s edited this page Nov 1, 2014 · 1 revision

Things About "extension name"

When we refer the "extension name", we are referring the extension name we used for extension_loaded().

Please note that the basename(ext_dir) does not equal to the extension name ("xxx".so).

When we run ext install, ext enable or ext disable we are actually referring the directory name instead of the actual extension name because we use the directory name to find the extension.

Overall, the extension name of all core extensions are equal to their corresponding directory name, except some extensions might be downloaded from a GitHub repository and the repository name is not equal to the extension name.

The package name in package.xml does not equal to the extension name, we should respect the "providesextension" attribute. e.g. soap extension defines ext_SOAP instead of soap in the package name section.

We should always respect the extension name by the following sequence:

  1. providesextension in the package.xml when package.xml is available.
  2. extension name in the config.m4

Extension Source Directory

The source directory is equal to the directory that contains a config.m4 file.

Chances are, the package.xml might be located at the root directory and the config.m4 might be in a subdirectory. e.g. xhprof:

xhprof/package.xml
xhprof/extension/config.m4

When running phpize to configure an extension, we should always change the current directory to the source directory.

Related Issues