Re: Proposal to run all tests with and without strict_types enabled
| From: | Pedro Lacerda | Date: | Mon, 12 Feb 2018 01:32:54 +0000 |
| Subject: | Re: Proposal to run all tests with and without strict_types enabled | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101830@lists.php.net to get a copy of this message | ||
I agree with
__STRICT_TYPES__, give me some time so I can try reimplement
check_strict_types() as a magic constant.
Maybe the idiom if (expr) die("reason"); is a bit verbose or cluttered
for a single expression SKIPIF section. A die_if(expr, reason) function
could be available in that context, or even skip_if(expr, reason) because
makes more sense there, albeit is a bit repetitive SKIPIF skip_if.
2018-02-11 20:42 GMT-03:00 Pedro Lacerda <pslacerda@gmail.com>:
> I'll check magic constants and give you a response.
>
> The skip message is up to the test developer, however at first I'll
> probably need to change all relevant tests and your message seems
> appropriated to put.
>
> 2018-02-11 20:34 GMT-03:00 Christoph M. Becker <cmbecker69@gmx.de>:
>
>> On 12.02.2018 at 00:03, Pedro Lacerda wrote:
>>
>> > So a new function check_strict_types() was needed to expose
>> > ZEND_ARG_USES_STRICT_TYPES() enabling .phpt tests to check for it in the
>> > --SKIPIF-- section if needed.
>>
>> Umm, I wonder whether a magic constant (say,
>> __STRICT_TYPES__) would
>> be more appropriate.
>>
>> > And the implementation draft is at this repository:
>> >
>> >
>> > https://github.com/php/php-src/compare/master...pslacerda:
>> experimental/strict_testing?diff=split
>>
>> Please have a look at the die()s – "skip" is omitted, but the rest of
>> the message is printed. Something like
>>
>> die('skip strict_types is not enabled');
>>
>> might be more appropriate.
>>
>> --
>> Christoph M. Becker
>>
>
>
>
> --
> Atenciosamente,
> Pedro Lacerda
>
--
Atenciosamente,
Pedro Lacerda