Remove any hard runtime or installation dependency on pear
List any tickets on http://bugs.horde.org/ that cover this issue or are relevant to it.
Ralf Lang
The PHP ecosystem has increasingly moved from pear to composer as the default installer. The changed paradigm (global versus local dependency management) attracts many users and developers.
horde-db-migrate "forgets" to migrate or even acknowledge libraries in git checkouts where the pear channel is not present.
https://github.com/horde/Core/pull/2
components/lib/Helper/Composer.php currently depends on conductor and gets its data from package.xml
anything handling package.xml is broken without pear though. Always need to register the horde channel
rewrite all pear.horde.org dependencies to vcs type dependencies github/horde/
https://github.com/horde/components/pull/3
Other resources
Do we want to keep a whitelist of other channels/packages which should be pulled from packagist or github rather than pear?
(we don't want /vendor/ web-readable)
horde apps are type "horde-application" and get installed to /$appname or base/appname
Installing/updating an app should clear cache and autoloader cache
Check if the app provides a registry snippet in /doc/
write horde.local.php if necessary
installing base should provide some initialization
horde libs are type "horde-library" and get installed to /vendor/Horde/Foo
Maybe we find some trick
Add tool chain to create and update packages on packagist for easier consumption.
horde/horde/index.php require_once lib/Application
Horde/Application.php require_once core.php
core.php checks for horde.local.php -- possible to announce a composer setup here
Either include_once Horde/Autoloader/Cache.php or require_once Horde/Autoloader/Default.php
horde/nag/index.php and other client pages require_once nag/lib/Application.php
nag probes for horde_dir (either info from horde.local.php or directory above nag dir)
finally load (hordedir)/lib/core.php
-> both in base and apps, we can edit horde.local.php for hinting and autoloader ultimately comes from horde/lib/core.php
Horde_Autoloader_Default has unconditional require_onces
Horde_Autoloader_Default registers unconditionally when loaded
Horde_Autoloader_Cache requires/registers Horde_Autoloader_Default unconditionally
git-tools binary detects the composer autoloader entrypoint vendor/autoload.php and require_once it.
the composer autoloader is configured to provide a psr-4 autoloader for the \\Horde\\GitTools namespace to ./lib
Most horde library packages are simple to map to the psr-0 autoloader.
Package Horde_Foo would have all its classes in lib/Horde/Foo.
Some packages though have class names you would not expect from the package name
Horde_Core has Horde_ErrorHandler & friends
Horde_Form has multiple classes in one file
Horde_Util has Horde_String
These either need to be scanned for additional mappings or need "classmap" style autoload hints.
We also need to think about db migrations and unit tests.
https://getcomposer.org/doc/articles/custom-installers.md composer notes on custom installers and plugins
https://github.com/composer/installers multi-framework collection of installers
Back to the Project List