Skip to content

fix: make bootstrap glob discovery portable#460

Merged
chubes4 merged 1 commit into
mainfrom
fix/459-playground-glob-brace
Jul 22, 2026
Merged

fix: make bootstrap glob discovery portable#460
chubes4 merged 1 commit into
mainfrom
fix/459-playground-glob-brace

Conversation

@chubes4

@chubes4 chubes4 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace brace-expansion bootstrap discovery with separate portable class and interface glob patterns
  • keep version-skew symbol top-up behavior unchanged without depending on optional PHP glob flags
  • guard the existing version-skew regression against reintroducing GLOB_BRACE

Root cause

The already-loaded/version-skew bootstrap path passed GLOB_BRACE unconditionally. That flag is optional and is not defined by PHP-WASM, so evaluating the argument fatally failed before plugin activation could complete.

Plain glob() wildcard matching is the core PHP primitive needed here. Running one pattern for class-*.php and one for interface-*.php discovers the same files without libc brace-expansion support, downstream shims, or runtime coupling.

Validation

  • php tests/bootstrap-version-skew-smoke.php
  • composer smoke
  • composer phpstan
  • composer validate --strict
  • PHP syntax checks for both changed files
  • compared portable discovery against brace discovery on normal PHP: identical 202-file set
  • WP Codebox 0.12.29 / Playground PHP-WASM / WordPress nightly activation probe: succeeded (run_ca3fad443dcd4f9b8b0eab3a3f32d0e9)
  • preserved activation artifact bundle: sha256:0bcb94af5bbd829575820c3e890305fc3a3a4fe2a5fcc463a93f4426918040d5

Fixes #459

@chubes4
chubes4 merged commit e9d6244 into main Jul 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: avoid GLOB_BRACE fatal in WordPress Playground

1 participant