Skip to content
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

Make kitchen sink extension bundle the default #1191

Merged
merged 6 commits into from
Apr 3, 2024

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Apr 3, 2024

Many reported issues are caused by Playground defaulting to the "light" PHP build. It saves 6MB of initial downloads, but it confuses new users with issues like broken image editing.

This PR changes the PHP bundle loaded by default to the "kitchen sink" one that ships with PHP extensions like finfo, GD, libxml. The change affects all APIs: Query, Blueprints, JS.

I don't like increasing the bundle size, but the light one is still an option for apps requiring less transfer and this should reduce the number of confused users and error reports.

Related issues

Testing instructions

  • Confirm the e2e tests passed.
  • Go to local Playground
  • Visit "/phpinfo.php" in Playground, confirm libxml is enabled (the
    output should contain --enable-xmlreader)
  • Open Playground configuration modal, uncheck the additional PHP
    extensions, confirm your choice
  • Confirm phpinfo.php now reports libxmls is disabled
  • Interact with that modal again, turn on the PHP extensions, confirm
    libxml is loaded again

CC @flexseth @dmsnell @bgrgicak @brandonpayton

adamziel added 3 commits April 3, 2024 17:45
Many reported Playground issues are caused by using the "light" build
that ships without popular PHP extensions like finfo or DOMDocument.
This PR changes the default PHP build loaded on the website to "kitchen sink"
where all these extensions are shipped. This increases the bundle size
from ~6MB to ~12MB, but reduces the number of ways in which Playground
may fail.

 ## Testing instructions

* Confirm the E2E tests pass
* Navigate to /phpinfo.php and confirm libxml is enabled by default (it
  says --enable-xmlreader)
* Go to Playground settings and uncheck the "Load extensions" checkbox.
* Confirm that /phpinfo.php now says libxml is disabled
  (--disable-xmlreader)
Many reported issues are caused by Playground defaulting to the
"light" PHP build. It saves 6MB of initial downloads, but it confuses
new users with issues like [broken image editing](#1190).

This PR changes the PHP bundle loaded by default to the "kitchen sink"
one that ships with PHP extensions like finfo, GD, libxml.

 ## Testing instructions

* Confirm the e2e tests passed.
* Go to local Playground
* Visit "/phpinfo.php" in Playground, confirm libxml is enabled (the
  output should contain --enable-xmlreader)
* Open Playground configuration modal, uncheck the additional PHP
  extensions, confirm your choice
* Confirm phpinfo.php now reports libxmls is disabled
* Interact with that modal again, turn on the PHP extensions, confirm
  libxml is loaded again

CC @flexseth @dmsnell @bgrgicak @brandonpayton
@adamziel
Copy link
Collaborator Author

adamziel commented Apr 3, 2024

Let's give it a try!

@adamziel adamziel merged commit b8686b9 into trunk Apr 3, 2024
4 of 5 checks passed
@adamziel adamziel deleted the make-kitchen-sink-extension-bundle-the-default branch April 3, 2024 23:16
@flexseth
Copy link
Collaborator

flexseth commented Apr 3, 2024

Let's give it a try!

Question: Do I need to update wp-now to see the new changes reflected in the VS Code Extension?

Most of the stress testing I've been doing is over there, or otherwise in local dev mode...

@adamziel
Copy link
Collaborator Author

adamziel commented Apr 3, 2024

@flexseth this is unrelated to the offline tools. Only the https://playground.wordpress.net/ is affected. Both wp-now and the VS Code extension already come with all the PHP extensions built in.

@bgrgicak
Copy link
Collaborator

bgrgicak commented Apr 4, 2024

I love this! We need to be mindful of the bundle size, but at the same time, our default behavior should be the same as PHP.

@flexseth
Copy link
Collaborator

flexseth commented Apr 26, 2024

Working on docs update

Understanding the "kitchen sink" #30


Here are the libraries I've found in the kitchen sink

PHP extensions

  • gd - image editing
  • finfo - get information about a file
  • mbstring - file handling for local and remote?
  • iconv - convert syntax on the fly?
  • openssl - website security
  • libxml, xml, simplexml, xmlreader, xmlwriter - import rich content
  • dom - builds a document for the web browser..?

Other things in the kitchen sink?

Are there more utilities? In lieu of digging through the repo and trying to figure it out, figured I'd ask here :)

Also, are these good representations what the libraries do?

Are they all PHP extensions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants