Re: handling non-fatal compile-time errors

From: Date: Sun, 29 Sep 2013 14:59:06 +0000
Subject: Re: handling non-fatal compile-time errors
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Sun, Sep 29, 2013 at 2:02 PM, Nikita Popov <[email protected]> wrote:

> On Thu, Aug 8, 2013 at 5:11 PM, Ferenc Kovacs <[email protected]> wrote:
>
>> Hi,
>>
>> I've just bumped into https://bugs.php.net/bug.php?id=65322 recently,
>> and I
>> would like you get some opinions on the issue.
>> Personally I think that it is a really bad design to introduce
>> pedantic(E_STRICT) errors which can break basic functionality of the
>> engine
>> (calling the registered autoloader), so if there is no viable solution to
>> make the autoloader work for these kind of errors, I would like to propose
>> removing the offending errors and make it a rule to not add compile-time
>> non-fatal errors until the problem is resolved.
>>
>
> By the way, there is no problem per-se to allow autoloading there (nested
> compilation due to error handlers is properly handled), the reason it
> currently has the in_compilation check there is to prevent all the class
> lookups from the compiler to trigger the autoloader (the compiler makes
> extensive use of zend_lookup_class, which sets use_autoload=1). If all
> lookups in the compiler are changed to use zend_lookup_class_ex with
> use_autoload=0 it might be possible to remove the condition there.
>
> Nikita
>

Thanks for the reply, about the requirement of the in_compilation check:
even recent comments stated that it is because the compiler not being
reentrant (see the last comments from
https://bugs.php.net/bug.php?id=54054&edit=1).
Personally I would be fine with the separate error level, but if we could
allow the autoloader there, that would be fantastic

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu


Thread (8 messages)

« previous php.internals (#69414) next »