Re: PECL/Core, autoloading and namespaces.

From: Date: Thu, 20 Jul 2006 09:19:28 +0000
Subject: Re: PECL/Core, autoloading and namespaces.
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-24750@lists.php.net to get a copy of this message
Richard Quadling wrote:
With recent discussions about getting extensions in or out of Core and out or into PECL, why are ANY extensions part of core?
I think mainly because we don't have the infrastructure yet to distribute extensions per-version (PHP-wise).
All platforms allow for configuration of allowable extensions, either by compilation, or by config file (ini) changes or by the use of dl (though this can now be restricted within PHP6 AFAIK).
dl will only be allowed for CLI/CGI.
One thing I can think of which would be an serious issue is interdepenedance. If ext_A requires ext_B, I don't know what the consequences would be. But again, a documentation issue to describe dependencies - something like PEAR does maybe.
Extension dependencies are implemented since 5.1 IIRC.
1 - What determines core or PECL? 2 - If extensions are moved out of core into PECL, do interdependency problems exist?
See above.
3 - Are there any mechanisms for autoloading PECL extensions?
No, there's no autoloading of any extensions; see above reg. dl().
4 - Could namespaces be used as an extension autoloading mechanism?
Hmmm. .dll or .so (I think), so we would need a OS specific constant (like DIRECTORY_SEPARATOR / PATH_SEPARATOR) - maybe EXTENSION_EXTENSION (Ha!).
There's PHP_SHLIB_SUFFIX, which leaves the 'php_' prefix oddity that differs on *nix/win32. -- Michael

« previous php.internals (#24750) next »