-
Notifications
You must be signed in to change notification settings - Fork 221
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
Support for PHP extensions: gd, mbstring, xml #681
Merged
Merged
Conversation
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
Adds support for loading arbitrary PHP extensions in the web version of Playground using all three available APIs: * Query API: `?php-extension=gd&php-extension=xml-bundle` * Blueprints: `{ "phpExtensions": [ "gd", "xml-bundle" ] }` * JavaScript API: `WebPHP.loadSync(phpVersion, { extensions: ["gd", "xml-bundle"]})` For now, it only switches between a barebones ~6MB PHP build and a larger ~8MB with more extensions included. In the future, the internal implementation will change and PHP extensions will be shipped and downloaded separately – see #673 1. Click the new "Load PHP extensions" checkbox in the configuration modal 2. Go to /phpinfo.php and confirm that `gd`, `xml`, and `mbstring` extensions are now available 3. Uncheck that checkbox 4. Confirm these extensions are no longer loaded
adamziel
commented
Oct 11, 2023
cc @tellyworth |
…ot support loading specific extensions by name anyway
This seems to work well enough and unblocks previewing more advanced plugins. Let's merge! |
adamziel
added a commit
that referenced
this pull request
Oct 12, 2023
… directory This change wasn't included in #681 but should have been
adamziel
added a commit
that referenced
this pull request
Oct 12, 2023
## What is this PR doing? Includes the `iconv` PHP extension in the kitchen-sink extension bundle, see #681 This work was done by @seanmorris in Pull Request #639, I'm only extracting it to a separate PR to ship it faster. <img width="961" alt="CleanShot 2023-10-12 at 11 13 59@2x" src="https://github.com/WordPress/wordpress-playground/assets/205419/a275ec51-e0fe-4e3d-8e66-b36987b2a57c"> ## Test plan 1. In Playground, go to `/phpinfo.php` 2. Confirm the iconv extension is not loaded by default 3. Go to the customization modal, check "load additional PHP extensions" 4. Confirm the iconv extension is now listed on `/phpinfo.php`
adamziel
pushed a commit
that referenced
this pull request
Oct 20, 2023
When the `php-extension-bundle` param was added in PR #681, the `wp` param was overwritten in the Query API documentation. Keeps `php-extension-bundle` param and adds back the documentation related to `wp` param. Also added `beta` param as a selectable option for `wp` version param. You can see this param in action here: https://playground.wordpress.net/?wp=beta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds support for loading arbitrary PHP extensions in the web version of
Playground using all three available APIs:
?php-extension-bundle=kitchen-sink
{ "phpExtensionBundles": [ "kitchen-sink" ] }
For now, it only switches between a barebones ~6MB PHP build and a
larger ~8MB with more extensions included. In the future, the internal
implementation will change and PHP extensions will be shipped and
downloaded separately – see #673
gd
,xml
, andmbstring
extensions are now availableSolves #655
cc @dmsnell @danielbachhuber @seanmorris