Re: Re: libidn2 extension for php
| From: | Hannes Magnusson | Date: | Mon, 21 Nov 2011 12:42:08 +0000 |
| Subject: | Re: Re: libidn2 extension for php | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56460@lists.php.net to get a copy of this message | ||
On Mon, Nov 21, 2011 at 13:35, Ferenc Kovacs <tyra3l@gmail.com> wrote:
>>
>> However there's a little problem. The new interface reports errors via the
>> usual ICU mechanism AND it also uses a new structure to pass IDNA specific
>> errors. Also, it reports whether the use of the transitional mechanism
>> affects the result. So I see only two solutions so that that extra
>> information is passed to the PHP user.
>>
>> * Add a second new parameter, by reference, wherein this extra information
>> is written.
>> * Instead of returning a string, return an array with all the new
>> information.
>>
>> In the patched attached I've gone for the second one, but I'm now more
>> inclined to the first. So if no one objects, I'm going to change that
>> detail, add a few tests and commit to 5.3, 5.4 and trunk somewhere this
>> next week.
>
>
> From what I can understand, if we go with option 1, then this patch would
> preserve BC, as it would only introduce additional arguments for the
> existing method.
> Did you checked that the tests are still passing with this patch? Could you
> also create a couple of tests covering the new behavior?
..And it bumps the minimal required ICU dependency, right?
-Hannes