{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/9515","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9515/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9515/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9515/events","html_url":"https://github.com/joomla/joomla-cms/issues/9515","id":142589836,"number":9515,"title":"OPCACHE - Upgrade to J!3.5 fails on Fatal error (JVersion)","user":{"login":"mahagr","id":854915,"avatar_url":"https://avatars.githubusercontent.com/u/854915?v=3","gravatar_id":"","url":"https://api.github.com/users/mahagr","html_url":"https://github.com/mahagr","followers_url":"https://api.github.com/users/mahagr/followers","following_url":"https://api.github.com/users/mahagr/following{/other_user}","gists_url":"https://api.github.com/users/mahagr/gists{/gist_id}","starred_url":"https://api.github.com/users/mahagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahagr/subscriptions","organizations_url":"https://api.github.com/users/mahagr/orgs","repos_url":"https://api.github.com/users/mahagr/repos","events_url":"https://api.github.com/users/mahagr/events{/privacy}","received_events_url":"https://api.github.com/users/mahagr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-03-22T09:15:52Z","updated_at":"2016-03-22T11:50:22Z","closed_at":null,"body":"#### Steps to reproduce the issue\r\n\r\nYou need a fast computer with SSD drive to reproduce this issue.\r\n\r\n* Install Joomla! 3.4.8\r\n* Go to admin and upgrade to Joomla! 3.5\r\n\r\n#### Expected result\r\n\r\nInstallation succeeds.\r\n\r\n#### Actual result\r\n\r\nFatal error: Undefined class constant 'PRODUCT' in libraries/joomla/updater/update.php on line 300\r\n\r\nInstallation seems to have failed almost right after installing the files; no database updates were made.\r\n\r\n#### Additional comments\r\n\r\nInstaller can never trust having latest version of any existing class available until the next page load (not even then without clearing apc/opcache); some plugin may have already loaded the older version of the class. In this case it looks like debug mode does the trick, but also sites in production may fail to upgrade because of plugins that use JVersion class.\r\n\r\nI have opcode turned on and I've already reproduced the issue 3 times in a row.\r\n\r\nUPDATE: This issue happens without debug mode on a clean installation."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/199776832","html_url":"https://github.com/joomla/joomla-cms/issues/9515#issuecomment-199776832","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9515","id":199776832,"user":{"login":"mahagr","id":854915,"avatar_url":"https://avatars.githubusercontent.com/u/854915?v=3","gravatar_id":"","url":"https://api.github.com/users/mahagr","html_url":"https://github.com/mahagr","followers_url":"https://api.github.com/users/mahagr/followers","following_url":"https://api.github.com/users/mahagr/following{/other_user}","gists_url":"https://api.github.com/users/mahagr/gists{/gist_id}","starred_url":"https://api.github.com/users/mahagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahagr/subscriptions","organizations_url":"https://api.github.com/users/mahagr/orgs","repos_url":"https://api.github.com/users/mahagr/repos","events_url":"https://api.github.com/users/mahagr/events{/privacy}","received_events_url":"https://api.github.com/users/mahagr/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T11:50:22Z","updated_at":"2016-03-22T11:50:22Z","body":"Looks like I have way too many PHP installations in my computer; and the version I was using for testing seemed to have default values, or `opcache.revalidate_freq: 2` as I had forgot to edit the file.\r\n\r\nAlso upgrade from 3.3.6 to 3.4.8 fails, but 3.4.1 to 3.4.8 seems to be fine; so the issue here is pretty clear: `opcache.revalidate_freq: 2`.\r\n\r\nI guess that this issue cannot be fixed for the older releases, but now that we know the issue, lets add opcache clear to both extension installer and joomla updater just after the files have been copied over. :) \r\n\r\nUpdating first message to get a better test case."}}