Timeouts and Syntax Errors with v3.0
I've just tried to upgrade to v3.0, and found two issues preventing me from upgrading:
-
The web server times out when making the
opcache:compilerequest, after 30 seconds. Of course this will vary by each server, but to get around it, I'm forced to useini_set('maximum_execution_time', 0), which I would rather not do. Is there a better fix that can be made within the package itself for this? -
My application is using PHP 7.4. When trying to compile the
vendordirectory, some packages (e.g.symfony/var-dumper) include test cases for PHP 7.4. When a file with PHP 7.4-specific code tries to compile, the command fails with a 500 error.
I tried excluding the paths, but the exclusion didn't seem to make any difference. Even so, when updating packages, it is feasible more PHP 7.4 code could be added at any time.
I would have thought surrounding the optimisation of each individual file in a try/catch might be a suitable fix?
I would have thought surrounding the optimisation of each individual file in a try/catch might be a suitable fix?
it's there.
https://github.com/appstract/laravel-opcache/blob/411e67ab0575cc589a719ef6ad05cbd2086b6aac/src/OpcacheClass.php#L64
Maybe this can help you
https://github.com/appstract/laravel-opcache/issues/90#issuecomment-522003043
Thanks for your help, adding Tests (case-sensitive T) to the exclusions has fixed point 2.
Point 1 still stands — any thoughts on how to avoid hitting maximum execution time?
30 seconds already seems long for most applications, so i'm not sure if we need to set that any higher.
Maybe we can make a config option for this