RE: [PEAR-DEV] Contribute a brand new package to PEAR

[email protected] (Васил Рангелов)
Newsgroups php.pear.dev
Message-ID <[email protected]>
Hi.

The process formally starts with PEPr [1] but I can tell you a few things
here anyway.

First things first - it's great to see you're following the coding standard
from the get go. Good job on that.

Now...

1. Consider reorganizing into classes with methods instead of functions.
That way, common data can be carried across calls, instead of being
explicitly specified always. I'd personally do it like how the MySQLi
extension does, and have the whole connection and login procedure at the
constructor, with everything else being a method of the class. Some projects
prefer the login being done separately, and that's OK too, especially if the
format allows you to do some things without a login.

2. Assuming you do 1, make sure to organize your folders in PSR-0 [2]
compliant fashion.

3. Some overall docs would be nice. I don't even know what SRF is, and the
examples don't actually help enlighten that.

4. I know someone will eventually tell you that if I don't, so... consider
using HTTP_Request2 [3] instead of plain cURL. This would allow mocks in
Unit tests, speaking of which...

5. Some PHPUnit tests would be nice.

6. The name of the package may have to change to something that reflects
what SRF is... Services_SRF maybe?


[1] http://pear.php.net/pepr/ 
[2] https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md 
[3] http://pear.php.net/package/HTTP_Request2 

-----Original Message-----
From: Pranjal Prabhash [mailto:[email protected]] 
Sent: Friday, August 10, 2012 11:07 PM
To: [email protected]
Subject: [PEAR-DEV] Contribute a brand new package to PEAR

Hello,

I have written a PHP library for an opensource organisation: Evergreen(
http://open-ils.org/ ) as part of my Google Summer of Code 2012 project(
http://www.google-melange.com ) . I would like to publish it as a PEAR
package. I went through one of your developers page i.e.
http://pear.php.net/manual/en/developers-newmaint.php , and want to know
whether my code can be published as a PEAR package, and if not then what
changes should I make.

My github repository is at https://www.github.com/pranjal710/osrf/. I have
used php_codesniffer, and it doesn't produce any error. I know that its not
the only parameter for a package to be published as a PEAR package, and
hence want to know more.

I would be really grateful if you could guide me and tell me more about it.

Thankyou

Regards
Pranjal Prabhash
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.