Re: can I depend on stable PEAR classes to not change?
| From: | Greg Beaver | Date: | Tue, 24 Aug 2004 16:50:23 +0000 |
| Subject: | Re: can I depend on stable PEAR classes to not change? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14255@lists.php.net to get a copy of this message | ||
Miles Keaton wrote:
I've been a PHP programmer for a long time but now that I'm starting some new projects, I'm taking a deeper look at what PEAR has to offer. I'm really impressed. If I write some apps based on PEAR features, but my system is constantly updating my /usr/local/share/pear directory, is it safe to assume that my code can depend on these PEAR classes for a long time? In other words: if I write a webapp that depends on HTML_QuickForm and Auth, for example - will my code be able to work as-is for years, while HTML_QuickForm and Auth are updated? Any insight appreciated. I couldn't find this in the PEAR FAQ. Thanks!The simple answer: yes you can depend on absolute BC The complex answer: in theory, this is true, but every new release has potential BC-breaking bugs. You should set up a local PEAR repository that can at a moment's notice contain the last working version. Then set your include_path to: ".:/home/yourusername/pear:/usr/local/share/pear" After your host upgrades to a newer, working version, you can simply uninstall the local copy and the global package will again be accessible. Setting up the web installer is somewhat more complex than setting up the command-line, but it can be done :). Greg