[dev] Dependencies for autoloading

Jan Schneider jan at horde.org
Wed Mar 20 09:18:50 UTC 2013


Zitat von Michael M Slusarz <slusarz at horde.org>:

> For now, I have Horde_Css_Parser with a required dependency on  
> Horde_Core.  This is there because, as written, Horde_Css_Parser  
> requires the horde-specific Horde_Autoloader setup to find the  
> actual parser files.
>
> However, 2 things occur to me:
> 1. Horde_Core doesn't actually setup the autoloader anyway.  This is  
> done by horde.  So Horde_Core is not even correct.
> 2. We don't take into account autoloading for other packages, right?  
>  The "Sabberworm" namespaced classes should be installed into PEAR  
> so that any default autoloading scheme should load them fine.  So we  
> shouldn't need any dependency on an autoloader, correct?

Correct, this is not different from Horde libraries. We don't require  
the autoloader there either, but we require autoloading. As long as  
Sabberworm is installed in a way that a PSR-0 autoloader can find it,  
you don't need to depend on the horde autoloader.

An alternative approach is what I'm probably going to do with  
Sabre_DAV, at least as long as we need to bundle it. It provides its  
own autoloader, so I'm going to include that in any code that uses  
Sabre APIs.
-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the dev mailing list