Improve Playground blueprint with modern PHP and cleaner syntax#865
Improve Playground blueprint with modern PHP and cleaner syntax#865huzaifaalmesbah wants to merge 1 commit intoWordPress:masterfrom
Conversation
- Update PHP version from 7.4 to 8.2 (7.4 is EOL since Nov 2022) - Simplify plugin syntax to string slug instead of verbose resource object - Use top-level login shorthand instead of step in steps array - Add explicit activatePlugin step to ensure plugin is active on load Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
I'm here just to clear this common mistake. PHP 7.4 has reached EOL, but some Linux distros still provide security backports for PHP 7.4. That's what LTS (long term support) distros are for. I wouldn't be surprised if some Red Hat version even supports PHP 5.x. |
Updated the WordPress Playground blueprint with cleaner syntax, explicit plugin activation, and a modern PHP version.
Changes
7.48.2stepslogin: trueshorthandactivatePluginstepRationale
1. PHP version update (7.4 → 8.2)
PHP 7.4 reached end-of-life on November 28, 2022 and no longer receives security updates. Using an EOL PHP version in the Playground demo:
The plugin supports PHP 7.2+ per
composer.json, so PHP 8.2 is fully compatible.Ref: https://www.php.net/supported-versions.php
2. Simplified plugin syntax
The
pluginsshorthand accepts strings directly for WordPress.org plugins. Per the JSON schema:The schema explicitly allows
{ "type": "string" }as a valid item type alongsideFileReference. This means:Ref: https://playground.wordpress.net/blueprint-schema.json (
#/properties/plugins)3. Top-level
loginshorthandThe schema defines
loginas a top-level property accepting boolean or object:Using
login: trueis cleaner than embedding a login step in thestepsarray, and is the recommended shorthand for simple admin authentication.Ref: https://playground.wordpress.net/blueprint-schema.json (
#/properties/login)4. Explicit plugin activation
The
activatePluginstep is defined in the schema as:{ "step": { "type": "string", "const": "activatePlugin" }, "pluginPath": { "type": "string" }, "required": ["pluginPath", "step"] }While
pluginsshorthand installs the plugin, adding an explicitactivatePluginstep ensures the Two-Factor plugin is active when the user lands on the profile page, making the demo immediately usable.Ref: https://playground.wordpress.net/blueprint-schema.json (step definition:
activatePlugin)Testing
Tested inline via:
Confirmed the Playground loads, plugin activates, and user lands on the profile page with Two-Factor options visible.
Generated with
This PR was created with assistance from Claude Code using the
blueprintskill for WordPress Playground blueprint review and best practices.Skill reference: https://github.com/WordPress/agent-skills/blob/trunk/skills/wp-playground/SKILL.md