Re: dependencies and channels
| From: | Greg Beaver | Date: | Fri, 02 Jul 2004 21:12:41 +0000 |
| Subject: | Re: dependencies and channels | ||
| References: | 1 2 3 | Groups: | php.pear.core |
| Request: | Send a blank email to pear-core+get-417@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
the thing is some channels might be trying to be compatible .. others may not. so for example if i have a company internal channel of modified pear packages i would like to make my installer understand this. however i still may use channels which are not pear compatible which have packages with the same name.I agree this is a potential issue, but in this case, you will want to do one of two options: 1) package your customized PEAR package and use it instead of the PEAR package 2) package and use in addition to the PEAR package Number 2 is REALLY hard to do, as you have to make sure that in your application you don't try to use another PEAR package that uses it, or you'll get conflicting class definitions, so you might as well do number 1 anyways. For number 1, you want to install it and have all of the existing packages use it, correct? However, upgrading this package to a "newer" version from pear.php.net opens all kinds of problems - what if you have additional features that suddenly don't exist in the PEAR upgrade? Tracking down bugs becomes next to impossible. for this reason, the namespace (this is what channels provide) must be different. You can do a forced uninstall and then install the pear package in the event that the customized package is no longer needed. Anyone doing customized packages will have this expertise, or at least understand it very quickly after asking on pear.general. However, you can still have files in the customized package conflict with a PEAR package - the installer won't allow both to be installed at once, but will allow either to be installed, whichever is first installed. so, Foo::Net_Socket can have Net/Socket.php in it, which conflicts with PEAR::Net_Socket, but you don't have to change "require_once 'Net/Socket.php';" in any other packages or applications. Does my argument make sense? I'm sure I haven't thought of everything :). Greg