Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Multiple calls of 'include' do not check for file modification HHVM 3.5.0 #4797
This is not currently supported. While we do intend to fix this eventually when running from source files, keep in mind it will not be fully compatible, as we will not support this (or any kind of eval()/generated code) in Repo Authoritative mode.
One approach to work around this for non-repo-authoritative mode is to put a timestamp (if it's updated rarely) or hash of the source in the filename.
Smarty does compile template source into PHP files and/or creates output PHP cache files.
Because of the problem the include file was updated on disk, but the old content will be displayed on the current request. The new content will be displayed correct on the next request for that page.
PHP does recheck the filestats on each include/require, will detect the file modification and include the updated file when called multiple times in the same script.
Using timestamp or hash of source does not work in our case because compiled and cache files may contain content of many individual template source files. So the file name can't be computed when a page is called.
I think this could be a major problem for all applications which will create/update PHP or Hack files.
Currently many of our units test do fail under HHVM as we do test recompilation and cache updates very intense. Currently we do have about 1900 individual tests to run. I tried to isolate the critical tests and run them in separate processes. But it seems that there could be race conditions between the individual processes as I get random errors.
+1 For fixing this. Another affected package is the yii2-composer package, which is a requirement for installing Yii2 via composer. This is a composer plugin that updates a list of installed extensions in