Re: PEAR2 package naming standards (namespace usage)
| From: | Kristopher Ives | Date: | Wed, 27 Aug 2008 06:25:55 +0000 |
| Subject: | Re: PEAR2 package naming standards (namespace usage) | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50644@lists.php.net to get a copy of this message | ||
Please do set me up in the pear2 repo, and I will start working on my
proposal for the PEAR2 branch. One thing I've been annoyeed with concerning
the naming is the Services_Shipping part, which I really want to be
Services::Shipping, is this possible? I don't have any "fancy" name for my
package, just that it's about shipping services :-/ I don't have a
production server for 5.3 available, but I do have a local test bed.
Cheers,
Kristopher Ives
On Tue, Aug 26, 2008 at 10:35 PM, Joshua Eichorn <josh@bluga.net> wrote:
> I believe what you would end up with is:
> pear2::services_shipping::XML
> pear2::services_shipping_ups::Driver
> pear2::services_shipping_dhl::Driver
>
> Though i don't have a great understanding of your setup so i can't quite be
> sure what the best plan would be.
>
> PEAR2 svn is all one repo but you would have a different directory for each
> subpackage so:
> http://svn.pear.php.net/pear2/services_shipping/trunk/src/...
> http://svn.pear.php.net/pear2/services_shipping_dhl/trunk/src
>
> But there is a default alias for ease of development that checks out all
> the trunk branches for you and you can check things out in whatever pattern
> you want so development wise we should be able to get a good solution.
> Other then that its the same repo so you move files around etc while
> keeping history.
>
> Travis should have more thoughts on what he would suggest as the names.
>
> Also i can get you setup in the pear2 sandbox if you'd like to start taking
> a look at developing for php 5.3 and getting and idea of what namespaces
> would mean to your code. Have more tests (and eyes) looking at the new
> conventions is always a good thing.
>
> -josh
> /
>
>
> /Kristopher Ives wrote:
>
>> 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
>>>
>>>
>>
>>
>>
>
>