Skip to content

[Docs] Document Symfony apps in Playground without WordPress#3766

Merged
adamziel merged 7 commits into
trunkfrom
docs-generic-php-playground
Jun 8, 2026
Merged

[Docs] Document Symfony apps in Playground without WordPress#3766
adamziel merged 7 commits into
trunkfrom
docs-generic-php-playground

Conversation

@adamziel

@adamziel adamziel commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

What it does

Adds a Symfony-focused guide at /guides/php-frameworks showing that Playground can run a PHP framework app without downloading WordPress.

Rendered Symfony Playground docs page

The guide embeds a runnable <php-snippet> that:

  1. starts PHP with wp="none",
  2. unzips the bundled Symfony Package Radar demo from the Blueprints gallery,
  3. boots the Symfony kernel,
  4. renders /, and
  5. reads the first <h1> with Composer-bundled WP_HTML_Processor.

The expected output confirms the Symfony route rendered and WordPress was not installed:

HTTP 200
Symfony page: Symfony Playground
WordPress installed: no

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

  • Adds /guides/php-frameworks and registers it in the Guides index/sidebar.
  • Adds a symfonyBlueprint live snippet example backed by the merged WordPress/blueprints Symfony ZIP.
  • Uses the bundled WordPress HTML API Composer package to parse the Symfony response without installing or booting WordPress.
  • Loads the local php-code-snippet.js while running the docs site in development, so snippet UI changes can be previewed before deploy.
  • Makes selected text visible inside <php-snippet> code blocks.

Testing instructions

  1. Run npm run dev and npm run dev:docs.

  2. Open http://127.0.0.1:3000/wordpress-playground/guides/php-frameworks.

  3. Confirm the Symfony snippet loads http://127.0.0.1:5400/website-server/php-code-snippet.js in development.

  4. Click Run and verify the output is:

    HTTP 200
    Symfony page: Symfony Playground
    WordPress installed: no
    

Also verified:

npx nx lint docs-site
npx nx lint playground-website

@adamziel adamziel requested review from a team, Copilot and zaerl June 7, 2026 22:04
@github-actions github-actions Bot added the [Type] Documentation Improvements or additions to documentation label Jun 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with wp="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.

Comment thread packages/docs/site/docs/main/guides/php-frameworks.md Outdated
Comment thread packages/docs/site/docs/main/guides/php-frameworks.md Outdated
Comment thread packages/docs/site/docs/main/guides/php-frameworks.md Outdated
Comment thread packages/docs/site/docs/main/guides/php-frameworks.md Outdated
Comment thread packages/docs/site/docs/main/guides/php-frameworks.md Outdated
@adamziel adamziel changed the title [Docs] Document PHP framework demos without WordPress [Docs] Document Symfony apps in Playground without WordPress Jun 8, 2026
@adamziel adamziel merged commit bec482b into trunk Jun 8, 2026
53 checks passed
@adamziel adamziel deleted the docs-generic-php-playground branch June 8, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants