Skip to content

Commit

Permalink
Ship the OpenSSL extension with the kitchen sink version of PHP.wasm (#…
Browse files Browse the repository at this point in the history
…883)

## What is this PR doing?

Related to #655

Includes the OpenSSL PHP extension in the `kitchen-sink` extension
bundle. This also makes it available via the "Load extensions" checkbox
on playground.wordpress.net.

## Testing instructions

1. Apply this PR
2. Open Playground and go to /phpinfo.php
3. Confirm the OpenSSL extension is listed as available
  • Loading branch information
adamziel committed Dec 19, 2023
1 parent 1160878 commit a54a69e
Show file tree
Hide file tree
Showing 23 changed files with 53 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prepublishOnly": "npm run build",
"preview": "nx preview playground-website",
"recompile:php:web": "nx recompile-php:light:all php-wasm-web && nx recompile-php:kitchen-sink:all php-wasm-web ",
"recompile:php:web:light": "nx recompile-php:light php-wasm-web ",
"recompile:php:web:light": "nx recompile-php:light:all php-wasm-web ",
"recompile:php:web:light:7.0": "nx recompile-php:light php-wasm-web --PHP_VERSION=7.0",
"recompile:php:web:light:7.1": "nx recompile-php:light php-wasm-web --PHP_VERSION=7.1",
"recompile:php:web:light:7.2": "nx recompile-php:light php-wasm-web --PHP_VERSION=7.2",
Expand All @@ -25,7 +25,7 @@
"recompile:php:web:light:8.1": "nx recompile-php:light php-wasm-web --PHP_VERSION=8.1",
"recompile:php:web:light:8.2": "nx recompile-php:light php-wasm-web --PHP_VERSION=8.2",
"recompile:php:web:light:8.3": "nx recompile-php:light php-wasm-web --PHP_VERSION=8.3",
"recompile:php:web:kitchen-sink": "nx recompile-php:kitchen-sink php-wasm-web",
"recompile:php:web:kitchen-sink": "nx recompile-php:kitchen-sink:all php-wasm-web",
"recompile:php:web:kitchen-sink:7.0": "nx recompile-php:kitchen-sink php-wasm-web --PHP_VERSION=7.0",
"recompile:php:web:kitchen-sink:7.1": "nx recompile-php:kitchen-sink php-wasm-web --PHP_VERSION=7.1",
"recompile:php:web:kitchen-sink:7.2": "nx recompile-php:kitchen-sink php-wasm-web --PHP_VERSION=7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/site/docs/08-query-api/01-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can go ahead and try it out. The Playground will automatically install the t
| `php` | `8.0` | Loads the specified PHP version. Supported values: `5.6`, `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `latest` |
| `wp` | `latest` | Loads the specified WordPress version. Supported values: `5.9`, `6.0`, `6.1`, `6.2`, `6.3`, `latest`, `nightly`, `beta` |
| `blueprint-url` | | The URL of the Blueprint that will be used to configure this Playground instance. |
| `php-extension-bundle` | | Loads a bundle of PHP extensions. Supported bundles: `kitchen-sink` (for gd, mbstring, iconv, libxml, xml, dom, simplexml, xmlreader, xmlwriter) |
| `php-extension-bundle` | | Loads a bundle of PHP extensions. Supported bundles: `kitchen-sink` (for gd, mbstring, iconv, openssl, libxml, xml, dom, simplexml, xmlreader, xmlwriter) |
| `networking` | `yes` or `no` | Enables or disables the networking support for Playground. Defaults to `no` |
| `plugin` | | Installs the specified plugin. Use the plugin name from the plugins directory URL, e.g. for a URL like `https://wordpress.org/plugins/wp-lazy-loading/`, the plugin name would be `wp-lazy-loading`. You can pre-install multiple plugins by saying `plugin=coblocks&plugin=wp-lazy-loading&…`. Installing a plugin automatically logs the user in as an admin |
| `theme` | | Installs the specified theme. Use the theme name from the themes directory URL, e.g. for a URL like `https://wordpress.org/themes/disco/`, the theme name would be `disco`. Installing a theme automatically logs the user in as an admin |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The `preferredVersions` property, unsurprisingly, declares the preferred of PHP

The `phpExtensionBundles` property is an array of PHP extension bundles to load. The following bundles are supported:

- `kitchen-sink`: Installs `gd`, `mbstring`, `iconv`, `libxml`, `xml`, `dom`, `simplexml`, `xmlreader`, `xmlwriter`
- `kitchen-sink`: Installs `gd`, `mbstring`, `iconv`, `openssl`, `libxml`, `xml`, `dom`, `simplexml`, `xmlreader`, `xmlwriter`

## Features

Expand Down
3 changes: 2 additions & 1 deletion packages/php-wasm/compile/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ const platformDefaults = {
},
['web-light']: {},
['web-kitchen-sink']: {
WITH_ICONV: 'yes',
WITH_LIBXML: 'yes',
WITH_LIBPNG: 'yes',
WITH_ICONV: 'yes',
WITH_MBSTRING: 'yes',
WITH_OPENSSL: 'yes',
},
node: {
WITH_ICONV: 'yes',
Expand Down
26 changes: 26 additions & 0 deletions packages/php-wasm/compile/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@php-wasm/compile",
"version": "0.1.5",
"description": "PHP.wasm – compilation pipeline",
"repository": {
"type": "git",
"url": "https://github.com/WordPress/wordpress-playground"
},
"homepage": "https://developer.wordpress.org/playground",
"author": "The WordPress contributors",
"contributors": [
{
"name": "Adam Zielinski",
"email": "adam@adamziel.com",
"url": "https://github.com/adamziel"
}
],
"private": true,
"license": "GPL-2.0-or-later",
"type": "module",
"gitHead": "a0eeb66fd5386bb56715fca2b89e9669a5b8618b",
"engines": {
"node": ">=16.15.1",
"npm": ">=8.11.0"
}
}
Loading

0 comments on commit a54a69e

Please sign in to comment.