Open chrisgraham opened 7 months ago
Wouldn't it be better to set setAutoRefresh(false)
in this case ?
In a development environment it's expected that new classes may appear, so auto refresh is needed. But on the same development environment, PHPStan aggressively creates cache files as PHP code. Other environments could have similar issues as it is fairly common for PHP files to be used for caching systems. I believe my PR provides a pretty modest solution to that, just making things a bit more configurable. (Looking at it now I can see somehow it got noisy with other commits, so just look at the ones I did please.)
This adds additional configurability to RobotLoader, to minimize unnecessary cache rewrites during stress. This reduces the chance of concurrency problems.