Importing regression fix – support old exported Playground ZIPs #1569
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
Closes #1543
Fixes importing older Playground exports via the
importWordPressFiles
step.Playground exports before changes from the Boot Protocol (#1398) contained platform-level WordPress plugins and mu-plugins. The importer, then, removed them and replaced them with the latest version freshly sourced from the /wordpress directory.
However, after the Boot Protocol changes, Playground no longer includes any platform-level plugins in the /wordpress directory. This means that things like SQLite database integration were being removed from the imported ZIP bundle but they were not restored.
This PR ensures the
0-sqlite.php
mu-plugin file will not be imported. This way, we won't try torequire
files that the old export assumes to exist but that do not exist anymore.Other ideas
I've initially tried removing the entire "remove & restore" files mechanism, but that resulted in the following error:
It turned out every platform-level file but 0-sqlite.php was listed for removal. Eventually I would still like to adjust the import flow to remove this "remove & restore" dynamics and allow import bundles to ship their own SQLite database integration plugin, but this PR will have to do for now.
Testing instructions
CC @vyskoczilova