-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support arbitrary PHP extensions (#681)
Adds support for loading arbitrary PHP extensions in the web version of Playground using all three available APIs: * Query API: `?php-extension-bundle=kitchen-sink` * Blueprints: `{ "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 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 <img width="1251" alt="CleanShot 2023-10-11 at 19 50 14@2x" src="https://github.com/WordPress/wordpress-playground/assets/205419/4f341a98-6a3a-4b01-b406-03d3e2834a20"> Solves #655 cc @dmsnell @danielbachhuber @seanmorris
- Loading branch information
Showing
60 changed files
with
1,088 additions
and
102 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
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
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
10 changes: 10 additions & 0 deletions
10
packages/php-wasm/universal/src/lib/supported-php-extensions.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const supportedPHPExtensions = ['mbstring', 'xml-bundle', 'gd'] as const; | ||
export type SupportedPHPExtension = (typeof supportedPHPExtensions)[number]; | ||
export const SupportedPHPExtensionsList = | ||
supportedPHPExtensions as any as SupportedPHPExtension[]; | ||
|
||
export const SupportedPHPExtensionBundles = { | ||
'kitchen-sink': supportedPHPExtensions, | ||
} as const; | ||
export type SupportedPHPExtensionBundle = | ||
keyof typeof SupportedPHPExtensionBundles; |
Oops, something went wrong.