Re: [PEAR-QA] Re: PEAR_Exception in HTTP_Request2
[email protected] (Alexey Borzov) Wed, 09 Nov 2011 20:15:55 +0400
| Newsgroups | php.pear.qa |
|---|---|
| Message-ID | <[email protected]> |
Hi Brett,
On 09.11.2011 20:07, Brett Bieber wrote:
>>> I just noticed that HTTP_Request2 requires PEAR_Exception. ;-(
>>>
>>> How do we fix this now?
>>
>> Your point being?..
>>
>> Quoting from http://pear.php.net/manual/en/standards.errors.php
>>
>>> All of PEAR packages exceptions must be descendant from PEAR_Exception.
>
> I would declare the required dependency on PEAR properly within the
> package.xml so people that install it using pyrus or some other method
> get all the necessary files
OK, I'll do this.
It was a bad idea in the first place to keep PEAR_Exception in PEAR package.
> — OR — change it to extend Exception, and
> begin following the newer (PEAR2) Exception standards (without
> namespaces of course).
> https://wiki.php.net/pear/rfc/pear2_exception_policy
I'd suggest fixing PEAR1 standards to allow such behaviour first.
> I've no problem with packages following the PEAR2 standards.
Maybe you should document that this is possible?
Also bear in mind that people using
try {
// some HTTP_Request2-related code
} catch (PEAR_Exception $e) {
}
Will suddenly get a BC break.
> In my projects I manually edit the HTTP/Request2/Exception.php file
> because I don't care to depend on all of PEAR. Typical example -
> https://github.com/saltybeagle/SimpleCAS/commit/827303a5467ea88ab278c38925538c86782c8b3a