Closed
Description
Occasionally, people report errors caused by loading outdated versions of Playground assets on playground.wordpress.net. For example, this report:
I ran into an error when I select “Browser” in the storage option:
Fatal error: Uncaught Error: Call to undefined function wp_check_php_mysql_versions() in /wordpress/wp-settings.php:2
One way this could have happened, is if the browser loaded mismatched versions of the WordPress wp.data file and the wp.js file. The wp.js contains a map of where each file starts and ends in wp.data and, given a wrong wp.data input, it would produce the correct directory structure, but each file would have the wrong contents.
Let's solve that.
Done is
- We start by building a failing E2E test for the following asset types. It should setup the browser and the playground to load a page, then update the asset files, then load the page again in a way that still uses the cached version of some of the assets.
- php.js and php.wasm
- wp.js and wp.data
- service worker
- web worker
- We write a patch that makes the test pass
- We keep the test to prevent regressions