Jan Schneider | 1 Sep 2011 10:56
Favicon
Gravatar

Re: Re: [PEAR-CVS] [pear/Net_Sieve] 8f7d9b: Replaced PEAR::isError() by is_a(..., "PEAR_Error"...


Zitat von Alan Knowles <alan <at> akbkhome.com>:

> You might want to add some is_object() checks around those.

Why? The only issue with recent PHP changes is that it triggers  
autoloading if not passing an object right? That isn't anything I  
really care about at this point.

> On Wednesday, August 31, 2011 04:47 PM, noreply <at> github.com wrote:
>>   Branch: refs/heads/master
>>   Home:   https://github.com/pear/Net_Sieve
>>
>>   Commit: 8f7d9bc27eb192eb9ddf76194e158f895e61bf31
>>        
>> https://github.com/pear/Net_Sieve/commit/8f7d9bc27eb192eb9ddf76194e158f895e61bf31
>>   Author: Christian Hammers<ch <at> lathspell.de>
>>   Date:   2011-08-30 (Tue, 30 Aug 2011)
>>
>>   Changed paths:
>>     M Sieve.php
>>
>>   Log Message:
>>   -----------
>>   Replaced PEAR::isError() by is_a(..., "PEAR_Error") as the former  
>> was not PHP E_STRICT compliant.
>>
>>
>>   Commit: 90393c48d03d173774e4a1375b174eb501096211
>>        
(Continue reading)

Jan Schneider | 1 Sep 2011 19:27
Favicon
Gravatar

Re: Re: [PEAR-CVS] [pear/Net_Sieve] 8f7d9b: Replaced PEAR::isError() by is_a(..., "PEAR_Error"...

I'd rather spend the time on porting Net_Sieve to PHP 5/PEAR2 though and
get rid of PEAR_Error and is_a() altogether.

    Zitat von Phone <mailinglist <at> akbkhome.com>:
>
> I did eyeball the code, i think one of the methods returns mixed  
> string|pear_error.
>
>    The reports i got was that a few people where throwing exceptions  
> in the autoloader if class was not found. (Not an unreasonable  
> behaviour). Hence pear code was crashing their applications.
>
>    Regards
>    Alan
>    --
>    Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>     
> Jan Schneider <jan <at> horde.org> wrote:   > Zitat von Alan Knowles  
> <alan <at> akbkhome.com>:  > You might want to add some is_object()  
> checks around those.  Why? The only issue with recent PHP changes is  
> that it triggers   autoloading if not passing an object right? That  
> isn't anything I   really care about at this point.  > On Wednesday,  
> August 31, 2011 04:47 PM, noreply <at> github.com wrote: >>   Branch:  
> refs/heads/master >>   Home:   https://github.com/pear/Net_Sieve >>  
> >>   Commit: 8f7d9bc27eb192eb9ddf76194e158f895e61bf31 >>         >>  
> https://github.com/pear/Net_Sieve/commit/8f7d9bc27eb192eb9ddf76194e158f895e61bf31 >>  
Author: Christian Hammers<ch <at> lathspell.de> >>   Date:   2011-08-30 (Tue, 30 Aug 2011) >> >>   Changed paths:
>>     M Sieve.php >> >>   Log Message: >>   ----------- >>   Replaced PEAR::isError() by is_a(..., "PEAR_Error")
as the former   >> was not PHP E_STRICT compliant. >> >> >>   Commit:
90393c48d03d173774e4a1375b174eb501096211 >>         >>
(Continue reading)

Christian Weiske | 2 Sep 2011 07:47
Picon
Favicon
Gravatar

Re: Re: Cache package and Unit Test

Hello ivo,

> The tests in the Cache_1_5_7-branch have problems:
Thanks for fixing those.

Now I have the problem that AllTests.php tries to include a
non-existing file, Cache_ContainerTest.php.

I'm ok with merging the changes to trunk. What are your next plans with
the Cache package?

--

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-
Picon
Gravatar

[PEPr] New proposal PEAR2_Net_RouterOS

Hello.

I'd like to propose a new package. The PEPr draft being
https://pear.php.net/pepr/pepr-proposal-show.php?id=664

And I also have some questions regarding Pyrus... the most important one
right now is, and I know it might seem like a silly question... How do I use
\PEAR2\Exception? I've tested my package with \Exception (and it works...),
but I can't find out how to autoload or include \PEAR2\Exception, mainly
because the "php" folder of Pyrus (both the system and user one) has nothing
but my package (and PEAR2_Pyrus_Developer... naturally). Am I missing
something, or is \PEAR2\Exception nonexistent yet, but just planned?

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Brett Bieber | 4 Sep 2011 01:58
Picon
Gravatar

Re: [PEPr] New proposal PEAR2_Net_RouterOS

2011/9/3 Васил Рангелов <boen.robot <at> gmail.com>:
> Hello.
>
> I'd like to propose a new package. The PEPr draft being
> https://pear.php.net/pepr/pepr-proposal-show.php?id=664

Excellent!

> And I also have some questions regarding Pyrus... the most important one
> right now is, and I know it might seem like a silly question... How do I use
> \PEAR2\Exception? I've tested my package with \Exception (and it works...),
> but I can't find out how to autoload or include \PEAR2\Exception, mainly
> because the "php" folder of Pyrus (both the system and user one) has nothing
> but my package (and PEAR2_Pyrus_Developer... naturally). Am I missing
> something, or is \PEAR2\Exception nonexistent yet, but just planned?

We're not recommending extending the PEAR2\Exception class.

All packages should implement a base exception interface, then extend
and throw SPL Exceptions which implement this interface.
https://wiki.php.net/pear/rfc/pear2_exception_policy

-- 
Brett Bieber

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

(Continue reading)

Christian Weiske | 4 Sep 2011 09:37
Picon
Favicon
Gravatar

Re: [PEPr] New proposal PEAR2_Net_RouterOS

Hello Васил,

> I'd like to propose a new package. The PEPr draft being
> https://pear.php.net/pepr/pepr-proposal-show.php?id=664

The code is awesome! Never seen such a nice proposal.

The only issue I found from overlooking the code was
"dispathNextResponse" (c missing)

--

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-
Vasil Rangelov | 4 Sep 2011 12:42
Picon
Gravatar

Re: [PEPr] New proposal PEAR2_Net_RouterOS

2011/9/4 Christian Weiske <cweiske <at> cweiske.de>:
> The code is awesome!
Thanks. Really appreciated ^_^ .
>Never seen such a nice proposal.
LOL. With the constant emphasis in the manual of "please don't waste
everyone's time", I would've hoped that's not the case :-P .

> The only issue I found from overlooking the code was
> "dispathNextResponse" (c missing)
Fixed. Thanks.

And I think I'm done splitting the exceptions too.

But there's something... sinister... going on. I can't generate
documentation now.

Looking at PhpDocumentor's output, it appears it's a combination of
the fact I've extended LengthException with a new getLength() method,
plus PhpDocumentor's lack of support for namespaces. It calls
\LengthException::getLength() instead of
\PEAR2\Net\RouterOS\LengthException::getLength(), and because of that,
it shows a call to an unidentified method, and stops there.

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Vasil Rangelov | 4 Sep 2011 19:32
Picon
Gravatar

[PEPr] Proposal for Networking::PEAR2_Net_RouterOS

Vasil Rangelov (http://pear.php.net/user/boen_robot) proposes Networking::PEAR2_Net_RouterOS.

You can find more detailed information here:
 http://pear.php.net/pepr/pepr-proposal-show.php?id=664

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Picon
Gravatar

[Pyrus issue] Fails to remove empty folders on uninstall

Hi everyone.

I seem to be unable to report a bug from the Pyrus' page (the link from
http://pear2.php.net/PEAR2_Pyrus to
https://github.com/pear2/PEAR2_Pyrus/issues/new gives a 404), so I'm
reporting it here.

When uninstalling a package, Pyrus seems to fail to remove empty folders,
and it spits warnings and everything. The files are removed successfully.
It's just the folders that are left behind. Initially I thought the problem
is in the order of file items traversed, but on a closer inspection of the
output, the folders were in the correct order. Looking at the source, it
seems the problem has more to do with the fact the folder removal is
attempted before the file removal.

From PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Uninstaller.php, starting at line
180:
====
                AtomicFileTransaction::rmEmptyDirs($dirtrees);
                AtomicFileTransaction::commit();
                $reg->commit();
                AtomicFileTransaction::removeBackups();
====
I think this should instead be
====
                AtomicFileTransaction::commit();
                AtomicFileTransaction::rmEmptyDirs($dirtrees); 
                $reg->commit();
                AtomicFileTransaction::removeBackups();
===
(Continue reading)

Till Klampaeckel | 6 Sep 2011 01:12
Picon

[PEPr] Comment on Networking::PEAR2_Net_RouterOS

This looks really cool and useful.

Great work on the code! :)

-- 
http://pear.php.net/pepr/pepr-proposal-show.php?id=664

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Gmane