annotations: CachedReader fails if Reflection class is eval'd code
If the ReflectionClass is eva’d code, then it crashes when checking when the cache is fresh. It tries to CachedReader::getLastModification of the eval’d code and results in:
Warning:` filemtime(): stat failed for /app/src/MyCode/EntityGenerator.php(36) : eval()'d code
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 17 (5 by maintainers)
I also started hitting this problem today for some yet unknown reason.
What causes
ReflectionClass
to say the filename is/.../.../vendor/friendsofphp/proxy-manager-lts/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php(54) : eval()'d code
and why doesCachedReader::getLastModification()
insist on callingfilemtime
on such a non-path?/summon @Ocramius
Yes, but since we can’t determine the age of the file, then all caching should be skipped.