Re: [PEAR-QA] Re: PEAR_Exception in HTTP_Request2

[email protected] (till) Wed, 9 Nov 2011 17:11:08 +0100
Newsgroups php.pear.qa
Message-ID <CAFx2Yf5N2HxJFWZXa3AeGXttegtjn8AgqLGONzkv2DGGvDOwRw@mail.gmail.com>
On Wed, Nov 9, 2011 at 5:07 PM, Brett Bieber <[email protected]> wrote:

> On Wed, Nov 9, 2011 at 9:50 AM, Alexey Borzov <[email protected]> wrote:
> > Hi Till,
> >
> > On 09.11.2011 19:47, till wrote:
> >>
> >> I just noticed that HTTP_Request2 requires PEAR_Exception. ;-(
> >>
> >> How do we fix this now?
> >
> > Your point being?..
>

My point being that:

1) You don't declare a dependency on PEAR (or PEAR_Exception).
2) A lot of packages already use Brett's approach and extend SPL exceptions
or just Exception.




> >
> > 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 — 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


Is that possible since HTTP_Request2 is stable?

Till


>
>
> I've no problem with packages following the PEAR2 standards.
>
> 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
>
> --
> Brett Bieber
>