Re: handling non-fatal compile-time errors
| From: | Nikita Popov | Date: | Sun, 29 Sep 2013 12:02:56 +0000 |
| Subject: | Re: handling non-fatal compile-time errors | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69413@lists.php.net to get a copy of this message | ||
On Thu, Aug 8, 2013 at 5:11 PM, Ferenc Kovacs <tyra3l@gmail.com> 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