Re: PEAR2 package naming standards (namespace usage)
| From: | Kristopher Ives | Date: | Wed, 27 Aug 2008 04:47:00 +0000 |
| Subject: | Re: PEAR2 package naming standards (namespace usage) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50642@lists.php.net to get a copy of this message | ||
Hello all!
I am a new PEAR developer, but I am very eager to adopt to the 5.3 release
of PHP and move far away from any existing BC, such as PEAR1. I am proposing
Services_Shipping, a driver-based shipping carrier framework. This includes
Services_Shipping_XML, which is an abstract set of classes that isn't a
driver, but a common set that XML drivers may use. Services_Shipping_UPS and
Services_Shipping_DHL are examples of driver sub-packages.
As I mentioned I am new to PEAR, but the above arrangement has caused the
names of my classes to be very long. For example one of my class names is
Services_Shipping_XML_ShipmentReceipt. From my understanding - this is
required in PEAR that the Services_Shipping_XML must always be there, due to
the lack of namespace/nesting. Under PEAR2 what would the pruposed layout of
my packages be?
Also, all of my projects are in one SVN repo.
Cheers,
Kristopher Ives
On Mon, Aug 25, 2008 at 3:17 PM, Travis Swicegood
<development@domain51.com>wrote:
> Hey everyone;
>
> This summer the PEAR group has been busy making sure PEAR2's ducks are all
> in a row for the impending PHP 5.3 release. The biggest change that we're
> all going to get used to in this new version of PHP is namespaces.
>
> The quick way to migrate is to replace all _ with ::, shorten some class
> names, but that ignores this very rare chance to really re-think the way we
> do package names. The results of some back and forth between myself and the
> rest of the PEAR Group and other members of the community is this RFC:
>
> http://wiki.pear.php.net/index.php/PEAR2_Naming_Standards
>
> Please review it and post your thoughts here for discussion. It is slated
> for a vote @ the next PEAR Group meeting on September 14th, so now is your
> opportunity to sway our opinion.
>
> -T