-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boot: Move WordPress zip extraction logic to a common unzipWordPress(…
…) utility (#1427) Moves the WordPress.zip extraction logic to a common utility function called `unzipWordPress` and living in the `@wp-playground/wordpress` package. This allows both `remote.html` and Playground CI to boot consistently. This and #1425 unlocks providing WordPress ZIP bundles in Blueprints via `{ "preferredVersion": { "wp": "<URL>" } }`. ## Implementation details and follow-up work The goal of `unzipWordPress()` is to extract a zipped WordPress installation at a specified location in VFS. This isn't a trivial task as WordPress might exist at a root of the zip file, at a nested `/wordpress` directory, in another `wordpress.zip` file living inside the initial `wp.zip` archive, or in any subdirectory of the above. The current implementation covers a few basic cases, but nothing beyond that. Looking forward, we should: * Move that logic to the [PHP Blueprints library](https://github.com/WordPress/blueprints-library/) * Either: * Make it "just work", e.g. by traversing nested zips and directories in search for WordPress * Don't guess anything and allow the developer to specify the exact "coordinates" of their zipped WordPress * Only accept a few variations, throw an error when an unsupported zip is provided, document it thoroughly and provide a very informative error message ## Testing instructions Confirm the E2E tests pass
- Loading branch information
Showing
3 changed files
with
58 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters