Bug #76535 [Opn]: Opcache does not replay compile-time warnings

From: Date: Thu, 28 Jun 2018 09:36:47 +0000
Subject: Bug #76535 [Opn]: Opcache does not replay compile-time warnings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216002@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76535&edit=1

 ID:                 76535
 Updated by:         laruence@php.net
 Reported by:        nikic@php.net
 Summary:            Opcache does not replay compile-time warnings
 Status:             Open
 Type:               Bug
 Package:            opcache
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I mean that if there is warning, people(php users) should fix it in there own codes...

anyway, I understand your point, maybe just disable opcache while test warnings?

I was concern that we need pay some costs, like performance reduce to achieve this... like
save_cwd...

if it cost little, then I have no problems....


Previous Comments:
------------------------------------------------------------------------
[2018-06-28 08:49:54] nikic@php.net

@laruence: My main use for this is testing. To test file cache, you need to run something like

    sapi/cli/php run-tests.php -P -c php.ini -d opcache.file_cache=/tmp Zend/
    sapi/cli/php run-tests.php -P -c php.ini -d opcache.file_cache=/tmp -d
opcache.validate_timestamps=0 Zend/

However, this causes a lot of test failures even if every thing works "correctly", due to
differences in warnings.

Unless by killing warnings you mean that we have plans to remove them from PHP entirely, I think it
makes sense to implement this.

------------------------------------------------------------------------
[2018-06-28 04:40:17] laruence@php.net

on the other hand, warnings should be killed anyway....

so I am not sure if it is worthy to do this...

------------------------------------------------------------------------
[2018-06-27 09:00:40] nikic@php.net

Description:
------------
If opcache is enabled, non-fatal compile-time diagnostics are only emitted on first compile, not
when the file is fetched from cache.

It would be nice if we would register an error handler that records all the emitted warnings and
then emit them when the file is loaded.

Main motivation is testing: Currently if you want to test a file cache compile&load cycle, you
have to filter out many tests that always fail due to warning differences. It's hard to spot
regressions because of that.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76535&edit=1


Thread (8 messages)

« previous php.bugs (#216002) next »