Re: Re: Difference in warning string for PHP5.2 and PHP5.3
| From: | Patrick ALLAERT | Date: | Mon, 07 Jun 2010 10:48:21 +0000 |
| Subject: | Re: Re: Difference in warning string for PHP5.2 and PHP5.3 | ||
| References: | 1 2 3 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-65574@lists.php.net to get a copy of this message | ||
Hi Felix, Stefan,
2010/6/5 Felix De Vliegher <felix.devliegher@gmail.com>:
> Hi
>
> The issue here is the difference between parameter handling in 5.2 and 5.3 (which has the
> improved parameter handling), that's why I suggested to Stefan to mention it here:
>
> 5.3:
> if (zend_parse_parameters_none() == FAILURE) {
> return;
> }
>
> 5.2:
> if (ZEND_NUM_ARGS() != 0) {
> WRONG_PARAM_COUNT;
> }
>
>
> I could fix this in 5.2 if no one has problems with it.
It should not be fixed.
PHPT tests files, as the whole PHP source code tree, are handled
through branches which represents PHP versions. It does mean that
those files are not shared across different PHP versions and therefore
should not take care of it (no SKIPIFs sections).
As an example, filesize_error.php, which handles error conditions on
filesize() function, appears at:
http://svn.php.net/repository/php/php-src/trunk/ext/standard/tests/file/filesize_error.phpt
http://svn.php.net/repository/php/php-src/branches/PHP_5_3/ext/standard/tests/file/filesize_error.phpt
http://svn.php.net/repository/php/php-src/branches/PHP_5_2/ext/standard/tests/file/filesize_error.phpt
There is no differences between the one in trunk and in PHP_5_3
branch, which use the following message in --EXPECTF--:
Warning: filesize() expects exactly 1 parameter, <X> given in %s on line %d
While in PHP_5_2 branch we can read:
Warning: Wrong parameter count for filesize() in %s on line %d
I would therefor recommend that the testfest SVN repository would be
structured the same way as the PHP one:
trunk/
branches/PHP_5_3/
branches/PHP_5_2/
So that all tests below a specific path could be run with the
corresponding version of PHP.
Correct me if I'm wrong, but I think the priority is to commit tests
to trunk and, if possible, to backport them to branches.
Cheers,
Patrick
> Cheers,
> Felix
>
> On 5-jun-2010, at 14:09, Stefan Koopmanschap wrote:
>
>> Hi all,
>>
>> I encountered a similar situation for sqlite_libencoding, and have
>> solved it in a similar way
>>
>> Stefan
>>
>> On Sat, Jun 5, 2010 at 1:31 PM, Stefan Koopmanschap
>> <stefan.koopmanschap@gmail.com> wrote:
>>> Hi all,
>>>
>>> While working on the tests for PHP TestFest in Maastricht, I came by a
>>> function that is generating a warning (in the error testcase, so the
>>> fact that a warning is generated is correct) that has a different
>>> warning string for PHP5.2 than for PHP5.3. Felix suggested I send an
>>> e-mail to this list to report this situation.
>>>
>>> I have committed the testcases now with two different testcases, one
>>> for 5.2 and one for 5.3, with SKIPIF blocks to make sure they only get
>>> executed on the right version as sqlite_libversion_error_php52.phpt
>>> and sqlite_libversion_error_php53.phpt
>>>
>>> Sincerely,
>>>
>>> --
>>> Stefan Koopmanschap
>>> http://www.stefankoopmanschap.nl/
>>> http://www.leftontheweb.com/
>>>
>>
>>
>>
>> --
>> Stefan Koopmanschap
>> http://www.stefankoopmanschap.nl/
>> http://www.leftontheweb.com/
>>
>> --
>> PHP Quality Assurance Mailing List
>> <http://www.php.net/>
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php