Torsten Roehr | 1 Jan 2009 14:16
Favicon

Asking for feedback on MDB2_Driver_mock draft

Hi devs,

I would like to get feedback on a first draft for an MDB2 mock driver.  
It's neither complete nor perfect yet but please take a look and express  
your opinion:

Zip: http://pear.zilleon.com/MDB2_Driver_mock/MDB2_Driver_mock.zip

Source code:
http://pear.zilleon.com/MDB2_Driver_mock/mock.php.txt
http://pear.zilleon.com/MDB2_Driver_mock/Datatype/mock.php.txt
http://pear.zilleon.com/MDB2_Driver_mock/tests/MDB2_Driver_mockTest.php.txt

It's heavily been borrowed from Greg Beaver's mockDB code used for testing  
pearweb (with his permission):
http://cvs.php.net/viewvc.cgi/pearweb/tests/mockDB/

For a better understanding of how it works please take a look at the  
example and the unit tests:
http://pear.zilleon.com/MDB2_Driver_mock/example.php.txt
http://pear.zilleon.com/MDB2_Driver_mock/tests/MDB2_Driver_mockTest.php.txt

There are methods to simulate fails as well to test that the application  
reacts to errors as expected:

For class MDB2_Driver_mock:
setConnectFails(true)
setPrepareFails(true)
setCharsetFails(true)

(Continue reading)

Walter Hop | 1 Jan 2009 16:12
Picon

Re[2]: [PEAR-DEV] status of Mail_mime?

[in reply to borz_off <at> cs.msu.su, 31-12-2008]

> The release will be pretty useless if it doesn't contain a fix for bug #11238:
> http://pear.php.net/bugs/bug.php?id=11238

I agree, that bug is probably the worst open one and it should be fixed.

> I spent a bit of time researching said bug and the fix will not be an easy one,
> unfortunately. Essentially we'll need to add logic to parse "structured" headers
> from RFC 822. 

I agree with this also. I took an hour browsing the specs, and I am of the opinion that we should parse them
fully before encoding. Anything less will go to waste, because sooner or later some user will encounter a
corner case that we have not handled properly. There are simply too much obscure corner cases in the spec,
e.g. comments, quoted names (containing chars like ',' or '<'), group names, escaping for people who
really want to write things like =?bla?b?=, etc...

> It won't need to be as complex as that in Mail_RFC822 class, but
> we'll need to split the header value into lexical parts, as described in section
> 3.1.4 of said RFC and then encode (or not) these parts separately.

I feel otherwise. I do think we need to do it all and not stop at some string magic. In my opinion we should
depend on Mail_RFC822 for working with address lists, rather than duplicatie its header-parsing logic
either partly or more or less completely. Plus, the Mail package would be a natural dependency that I can't
see inconveniencing many users.

For structured headers (From, To, Cc, Bcc, Sender, Resent-To, Resent-Cc, Resent-Bcc) we would parse the
contents as well as possible and rebuild a properly encoded header.

The only thing that we would need to create, is a function to rebuild a (properly encoded) address list
(Continue reading)

Picon
Gravatar

move packages from mash to hash

Hi everyone,

Something I hadn't given much thought about before but after I was
setting up a clean installation of PHP and pearweb I was bothered by
the fact I needed to install mhash to satisfy a package dependency.

Now since mhash has been obsoleted by the hash extension and in fact
hash is used by mhash now just to keep compatibility :-)
Hash is enabled by default with 5.1.2 onwards and is available in pecl
for lower PHP versions (including PHP 4).

So my question is, do people want to make a push on the packages that
make use of mhash and make them use hash instead ?
To me it would seem like a good thing to do.

Regards
Helgi

--

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

Firman Wandayandi | 2 Jan 2009 08:41
Picon
Gravatar

Re: move packages from mash to hash

On Fri, Jan 2, 2009 at 12:54 PM, Helgi Þormar Þorbjörnsson
<helgith <at> gmail.com> wrote:
> So my question is, do people want to make a push on the packages that
> make use of mhash and make them use hash instead ?
> To me it would seem like a good thing to do.
>

Which packages are? Use hash instead of mhash is good choice for sure,
since mhash used hash it would be boost performance a bit I guess.

-- 
Firman Wandayandi
http://firmanw.com/

--

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

Picon
Gravatar

Re: move packages from mash to hash

On Fri, Jan 2, 2009 at 7:41 AM, Firman Wandayandi <firmanw <at> gmail.com> wrote:
> Which packages are? Use hash instead of mhash is good choice for sure,
> since mhash used hash it would be boost performance a bit I guess.

The one I saw was Net_DNS but there probably are others, need to
create some fancy sql queries and figure it out from out database.

- Helgi

--

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

Firman Wandayandi | 2 Jan 2009 09:11
Picon
Gravatar

Re: move packages from mash to hash

On Fri, Jan 2, 2009 at 2:58 PM, Helgi Þormar Þorbjörnsson
<helgith <at> gmail.com> wrote:
> On Fri, Jan 2, 2009 at 7:41 AM, Firman Wandayandi <firmanw <at> gmail.com> wrote:
>> Which packages are? Use hash instead of mhash is good choice for sure,
>> since mhash used hash it would be boost performance a bit I guess.
>
> The one I saw was Net_DNS but there probably are others, need to
> create some fancy sql queries and figure it out from out database.
>

Yeah go for it. Next question: Who will push it? The maintainer,
volunteer, qa guys or you? :D

QA guy should notice the maintainer who have mhash dependency in their
package privately to use hash.

-- 
Firman Wandayandi
http://firmanw.com/

--

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

Picon
Gravatar

Re: move packages from mash to hash

On Fri, Jan 2, 2009 at 8:11 AM, Firman Wandayandi <firmanw <at> gmail.com> wrote:
> QA guy should notice the maintainer who have mhash dependency in their
> package privately to use hash.

Yeah that's the idea if people are generally fine with this idea.

- Helgi

--

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

Joseph Stump | 2 Jan 2009 09:26
Gravatar

Re: move packages from mash to hash

On Fri, Jan 2, 2009 at 3:16 PM, Helgi Þormar Þorbjörnsson <helgith <at> gmail.com
> wrote:

> On Fri, Jan 2, 2009 at 8:11 AM, Firman Wandayandi <firmanw <at> gmail.com>
> wrote:
> > QA guy should notice the maintainer who have mhash dependency in their
> > package privately to use hash.
>
> Yeah that's the idea if people are generally fine with this idea.

I'm +1.

--Joe
Stefan Walk | 2 Jan 2009 10:50
Picon

Re: move packages from mash to hash


On 2 Jan 2009, at 9:26, Joseph Stump wrote:

> On Fri, Jan 2, 2009 at 3:16 PM, Helgi Þormar Þorbjörnsson <helgith <at> gmail.com
>> wrote:
>
>> On Fri, Jan 2, 2009 at 8:11 AM, Firman Wandayandi <firmanw <at> gmail.com>
>> wrote:
>>> QA guy should notice the maintainer who have mhash dependency in  
>>> their
>>> package privately to use hash.
>>
>> Yeah that's the idea if people are generally fine with this idea.
>
>
> I'm +1.
>
> --Joe

Keep in mind that ext/hash is in PHP since 5.1.2, whereas mhash is  
available in earlier versions ...

Regards,
Stefan
--

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

Picon
Gravatar

Re: move packages from mash to hash

On Fri, Jan 2, 2009 at 9:50 AM, Stefan Walk <stefan.walk <at> gmail.com> wrote:

> Keep in mind that ext/hash is in PHP since 5.1.2, whereas mhash is available
> in earlier versions ...

you always had to compile mhash in - hash is available to php 4 and up
users through pecl - basically amounts to the same thing in my mind,
no ? :-)
Okey you might not need to download mhash to compile it in but you
know, you still have to compile it.

- Helgi

--

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


Gmane