-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple calls of 'include' do not check for file modification HHVM 3.5.0 #4797
Comments
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. |
i just disable the templating and use nginx fastcgi cache as a work around. |
+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 |
+1 for fixing include behaviour (a way to include multiple time a same file). I ran into an issue with some unit tests independently than smarty. |
For Smarty I have implemented a workaround for this problem. |
1. Added File::writeAndInclude which solves facebook/hhvm#4797 2. Improved Cache internal includes to be HHVM friendly 3. Added HHVM to the tests
Summary: I hope this time everything is fine... Closes #6854 Differential Revision: D2961936 Pulled By: aorenste fbshipit-source-id: 5e8db79d67447a14f9914cb2b1ccee1aeb16b7f5
* Instead of a hacky 'sed -i' in composer.json, dynamically declare the class MediaWikiTestCase if missing (when PHPUnit is called directly). * Check if phpdbg is installed, else use php * Skip two tests when running HHVM because of issue #4797 "Multiple calls of 'include' do not check for file modification HHVM 3.5.0" facebook/hhvm#4797 Possibly a workaround will be later added, but for now try to render MediaWikiFarm compatible with WMF CI suites * Fixed two phpcs issues * Dynamically create two JSON files with bad syntax (used in a test) to avoid trigerring a CI error report * Made phpdoc optional for now Bug: T151879 Change-Id: I17604c11e773f74f2c8b7ccb6aa7919cb729d552
This was fixed. |
No description provided.
The text was updated successfully, but these errors were encountered: