Merging two classes

From: Date: Mon, 01 Sep 2003 23:33:41 +0000
Subject: Merging two classes
Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-173@lists.php.net to get a copy of this message
Hi everyone, I'd like to know how I should act in the following situation: In an effort to reduce the amount of alternative classes in PEAR (no, I'm not talking about Template engines, sorry :-), I managed to merge two packages I maintain. The two classes I'm talking about are Pager and Pager_Sliding. I already have refactored the two under the same package. Now I'd like to release the new PEAR::Pager, which replaces the old one (don't worry, BC is kept @100%), and drop Pager_Sliding development as a standalone package. You can still use the old syntax and act like you are using the old (standalone) versions, i.e. you still can do sth like this: require 'Pager/Sliding.php'; $pager = &new Pager_Sliding($options); or require 'Pager/Pager.php'; $pager = &new Pager($options); but the new version uses Pager/Pager.php as a wrapper for Sliding.php and Jumping.php. The default options are set to match the old look&feel, but I'd like to change them slightly. The two classes share a large codebase, so I moved those methods in Common.php. Merging them makes maintainance a LOT easier, and switching between the two a matter of changing one word in the options. Now all the options available in Pager_Sliding are also implemented in Pager. Since the API is the same, now I can even avoid writing the docs for both of them, and write it once. How should I proceed, though? My plan is to release a last version (with the last fixes from the previous release) of the 2 old packages, stating that they will be the last ones as "standalone" packages, and then release the new merged pkg. How can I declare the "death" of a package? An info in the README is enough? Should I document this in the pear manual? How? What about version number? Should I increase the major version # even if there's no BC issue? API docs and source code of the new class: http://cambiano.onlinein.it/pearzone/new_pager/docs/ (for source code, go to the bottom-left frame, select File(s), the file name, then in the right frame select "filesource: - Source Code for this file"). Download the package: http://cambiano.onlinein.it/pearzone/new_pager/Pager-2.0.tgz An usage example is provided. Best regards, Lorenzo

« previous php.pear.qa (#173) next »