[PEPr] +1 for Web Services::Mailman
| From: | Michael Gauthier | Date: | Wed, 18 Jan 2012 22:30:59 +0000 |
| Subject: | [PEPr] +1 for Web Services::Mailman | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54726@lists.php.net to get a copy of this message | ||
Michael Gauthier (http://pear.php.net/user/gauthierm) has voted +1 on the proposal for Web
Services::Mailman.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=672
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=672&handle=gauthierm
This vote is conditional. The condition is:
1.) Clean up variable and method names. Don't need to shorten request to req, it just makes it
harder to read. $adminurl should be $adminURL.
2.) in fetch(), the check to see if it is HTML could be made more robust. What is the service
changes to using lower case <HTML>? What if the response is not HTML but contains the string
<HTML>?
3.) Use DOM+XPath to parse responses rather than regular expressions. Using regular expressions to
parse XML is questionable.
4.) in fetch, you throw an exception and then return false. The return false will never execute.
This antipattern is repeated in other places in the package.
5.) Package-specific exception class is required. Right now it's not possible to handle errors
from this package.
6.) Your methods should have no return and always throw exceptions rather than having to both catch
expected exceptions and check for false as a return value.
7.) needs a package.xml
8.) Needs unit tests.
9.) Since the code looks heavily dependent on the output of a particular mailman version, perhaps
there should be some sort of support for versioning and/or mailman version detection.