WordPress / WordPress/block-development-examples
wp-env environment: EOL PHP 7.4 and unpinned Gutenberg trunk don't match what learners actually run
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 334
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Problem
.wp-env.json defines the environment every contributor (and future CI) develops and tests in, and it diverges from what users of these examples actually run:
"phpVersion": "7.4"— EOL since November 2022. Examples are developed and tested on a PHP version WordPress hosting recommendations have moved past; PHP 8.x deprecation warnings that learners would hit ship unseen.- The Gutenberg plugin is installed from an unpinned trunk zip (
https://downloads.wordpress.org/plugin/gutenberg.zip). Every API these examples demonstrate — including the Interactivity API and its router — is in stable core now, so the dev/test environment runs different editor code than a stock WordPress site, and a non-deterministic version of it at that.
Proposed fix
- Bump
phpVersionto8.2(current WordPress hosting recommendation). - Remove the Gutenberg plugin from
.wp-env.json. If a future example genuinely needs a Gutenberg-plugin-only feature, add it back deliberately — pinned — and note the requirement in that example's README. - Leave
coreunpinned (latest stable): an examples repo should break loudly when a new WordPress release breaks an example, and per-PR e2e (#147) makes that visible quickly.
Consequences to be aware of
- Examples will no longer be exercised against upcoming editor features ahead of core releases — accepted trade-off; matching the learner's environment wins.
- Most plugin headers claim
Requires PHP: 7.0while the repo will only test on 8.2. The header-normalization PR in #150 should align those claims with what is actually tested.
Out of scope
.nvmrcpinning andpackageManager(covered by #148).- Plugin header
Requirescorrections (covered by #150).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .wp-env.json and compare its phpVersion, Gutenberg plugin URL, and core settings with the proposed environment. Update the environment to PHP 8.2 without Gutenberg, then run the per-PR e2e checks referenced in #147 and confirm the examples still work against latest stable core.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100