Edit report at https://bugs.php.net/bug.php?id=81041&edit=1
ID: 81041
Updated by: nikic@php.net
Reported by: mvorisek at mvorisek dot cz
Summary: Phpstan does not finish on Windows when opcache is
enabled
Status: Feedback
Type: Bug
Package: opcache
Operating System: Windows
PHP Version: 7.4.19
Block user comment: N
Private report: N
New Comment:
To be clear, when you say "does not finish" you are talking about this fatal error, not
about an infinite loop?
PHP Fatal error: During class fetch: Uncaught PHPStan\Broker\ClassAutoloadingException: Class
Atk4\Core\ReadableCaptionTrait not found. in
D:\a\phpstan-src\phpstan-src\src\Reflection\Runtime\RuntimeReflectionProvider.php:186
Stack trace:
#0 [internal function]:
PHPStan\Reflection\Runtime\RuntimeReflectionProvider->PHPStan\Reflection\Runtime\{closure}()
#1 D:\a\phpstan-src\phpstan-src\repro\ui\vendor\atk4\data\src\Field.php(17): spl_autoload_call()
#2 D:\a\phpstan-src\phpstan-src\vendor\composer\ClassLoader.php(478):
include('D:\\a\\phpstan-sr...')
#3 D:\a\phpstan-src\phpstan-src\vendor\composer\ClassLoader.php(346):
Composer\Autoload\includeFile()
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#5 [internal function]: spl_autoload_call()
#6 D:\a\phpstan-src\phpstan-src\src\Reflection\Runtime\RuntimeReflectionProvider.php(191):
class_exists()
#7
D:\a\phpstan-src\phpstan-src\src\Reflection\ReflectionProvider\ClassBlacklistReflectionProvider.php(49):
PHPStan\Reflection\Runtime\RuntimeReflectionProvider->hasCla in
D:\a\phpstan-src\phpstan-src\repro\ui\vendor\atk4\data\src\Field.php on line 17
Fatal error: During class fetch: Uncaught PHPStan\Broker\ClassAutoloadingException: Class
Atk4\Core\ReadableCaptionTrait not found. in
D:\a\phpstan-src\phpstan-src\src\Reflection\Runtime\RuntimeReflectionProvider.php:186
Stack trace:
#0 [internal function]:
PHPStan\Reflection\Runtime\RuntimeReflectionProvider->PHPStan\Reflection\Runtime\{closure}()
#1 D:\a\phpstan-src\phpstan-src\repro\ui\vendor\atk4\data\src\Field.php(17): spl_autoload_call()
#2 D:\a\phpstan-src\phpstan-src\vendor\composer\ClassLoader.php(478):
include('D:\\a\\phpstan-sr...')
#3 D:\a\phpstan-src\phpstan-src\vendor\composer\ClassLoader.php(346):
Composer\Autoload\includeFile()
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#5 [internal function]: spl_autoload_call()
#6 D:\a\phpstan-src\phpstan-src\src\Reflection\Runtime\RuntimeReflectionProvider.php(191):
class_exists()
#7
D:\a\phpstan-src\phpstan-src\src\Reflection\ReflectionProvider\ClassBlacklistReflectionProvider.php(49):
PHPStan\Reflection\Runtime\RuntimeReflectionProvider->hasCla in
D:\a\phpstan-src\phpstan-src\repro\ui\vendor\atk4\data\src\Field.php on line 17
Previous Comments:
------------------------------------------------------------------------
[2021-05-17 08:46:33] m at m dot cz
> Use opcache.cache_id[1] to enforce different caches.
In CI, reproduced with no parallel processes, see https://github.com/mvorisek/phpstan-src/runs/2587303770
------------------------------------------------------------------------
[2021-05-17 08:12:14] cmb@php.net
> In CLI, opcache is always cold on start, [â¦]
On Windows, different CLI processes share a single OPcache
instance when running in parallel. Use opcache.cache_id[1] to
enforce different caches.
[1] <https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.cache-id>
------------------------------------------------------------------------
[2021-05-15 03:55:36] fjfjd at fjdjf dot fjf
opcache has a ton of optimization stages and so does far more than caching
------------------------------------------------------------------------
[2021-05-14 22:16:30] mvorisek at mvorisek dot cz
I understand your feedback, but can you please ping some core developer of opcache?
In CLI, opcache is always cold on start, so the script should never notice opcache enabled, is this
correct, or does opcache have some side effects?
------------------------------------------------------------------------
[2021-05-14 21:44:05] daverandom@php.net
Unfortunately this issue cannot currently be regarded as a PHP bug with the information presented.
While it may be a fault in the engine that causes the problem, the PHP development team cannot debug
applications as it is a long way outside their scope.
If you undertake further diagnostics which indicate a specific problem with PHP, please open a new
bug report.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81041
--
Edit this bug report at https://bugs.php.net/bug.php?id=81041&edit=1