[Docs] Document Symfony apps in Playground without WordPress#3766
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds documentation showing that Playground can run non-WordPress PHP apps by skipping WordPress bootstrap, demonstrating the pattern with a bundled Symfony demo.
Changes:
- Added a new guide page: “Run PHP frameworks in Playground”
- Added a live
<php-snippet>example that unzips and runs the Symfony Package Radar demo withwp="none" - Registered the new guide in the Guides index and sidebar navigation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/docs/site/src/components/PhpCodeSnippetLiveExample.examples.ts | Adds a new live snippet example (symfonyBlueprint) that downloads/unzips a Symfony app and runs it without WordPress |
| packages/docs/site/sidebars.js | Adds the new guide to the Guides sidebar |
| packages/docs/site/docs/main/guides/php-frameworks.md | New guide explaining non-WordPress PHP framework usage and embedding a runnable Symfony example |
| packages/docs/site/docs/main/guides/index.md | Adds the new guide to the Guides landing page |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
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.
What it does
Adds a Symfony-focused guide at
/guides/php-frameworksshowing that Playground can run a PHP framework app without downloading WordPress.The guide embeds a runnable
<php-snippet>that:wp="none",/, and<h1>with Composer-bundledWP_HTML_Processor.The expected output confirms the Symfony route rendered and WordPress was not installed:
Rationale
Playground is usually documented as a WordPress runtime, but its PHP/WASM runtime, filesystem, networking layer, snippets, and Blueprints can also host framework examples. Symfony is a useful proof point because the demo exercises routing, autowired services, Twig rendering, Symfony HttpClient, Composer dependencies, and the WordPress HTML API without Node.js, Sass, a database, or a local Composer install.
Implementation
/guides/php-frameworksand registers it in the Guides index/sidebar.symfonyBlueprintlive snippet example backed by the mergedWordPress/blueprintsSymfony ZIP.php-code-snippet.jswhile running the docs site in development, so snippet UI changes can be previewed before deploy.<php-snippet>code blocks.Testing instructions
Run
npm run devandnpm run dev:docs.Open
http://127.0.0.1:3000/wordpress-playground/guides/php-frameworks.Confirm the Symfony snippet loads
http://127.0.0.1:5400/website-server/php-code-snippet.jsin development.Click Run and verify the output is:
Also verified: