Skip to content

Feature/phase 1 Quick Wins#4

Merged
jasperf merged 13 commits into
mainfrom
feature/phase-1-quick-wins
May 24, 2026
Merged

Feature/phase 1 Quick Wins#4
jasperf merged 13 commits into
mainfrom
feature/phase-1-quick-wins

Conversation

@jasperf
Copy link
Copy Markdown
Contributor

@jasperf jasperf commented May 24, 2026

This release establishes v0.4.0 as a platform maturity milestone, raising minimum requirements to PHP 8.3 and WordPress 7.0 while introducing a PHPUnit 11 test suite with coverage for the two core classes. Beyond dependency alignment, three substantive features were added: a waygate_pattern_prefixes filter that decouples the plugin from the Elayne theme and enables any theme to supply patterns, REST API semantic annotations on registered Abilities, and text-generation capability detection in AiIntegration. A category filter dropdown was also added to the admin pattern catalog, improving usability when a site registers a large number of patterns.

Platform and Dependency Upgrades:

  • Minimum PHP raised to 8.3 and minimum WordPress raised to 7.0; CI matrix now tests against PHP 8.3 and 8.4 to match the supported range.
  • PHPUnit upgraded to version 11 with a committed phpunit.xml configuration and composer.lock tracked for reproducible installs across environments.

Feature Additions:

  • A waygate_pattern_prefixes filter in PatternLab replaces the hardcoded elayne/ prefix check, allowing any theme or plugin to register its own pattern namespace with Waygate.
  • AbilitiesApi now attaches idempotent, readonly, and destructive annotations to registered Abilities, providing REST API clients with explicit semantics for each operation.
  • AiIntegration gains a supports_text_generation() guard that checks provider capability before attempting generation, preventing silent failures when an incompatible provider is configured.
  • The admin pattern catalog received a category filter dropdown, scoping the visible pattern list without a page reload.

Testing Infrastructure:

  • tests/Unit/PatternLabTest.php and tests/Unit/AiIntegrationTest.php were introduced alongside tests/bootstrap.php, covering the Phase 1 changes with isolated unit tests that do not require a running WordPress installation.

Documentation and Configuration:

  • README.md and CHANGELOG.md updated to reflect v0.4.0 generic theme support and the new platform requirements.
  • .gitignore updated to exclude .phpunit.result.cache; CLAUDE.md updated with revised architecture notes and the PHPUnit run command.

Files Changed:

Dependency lock files updated: composer.lock,

jasperf added 13 commits May 24, 2026 13:15
Hide AI generation form when no configured provider supports text
generation; show a more specific status badge in the admin UI.

Co-Authored-By: Jasper Frumau <jasper@imagewize.com>
Mark list-patterns as readonly and create-page as idempotent so
consumers and the REST endpoint can reason about their side-effects.

Co-Authored-By: Jasper Frumau <jasper@imagewize.com>
…ilter

Replace the hardcoded elayne/ prefix with a filterable array so the
plugin works with any block theme, not just Elayne.
Add bootstrap with WordPress function/class stubs, phpunit.xml, and
tests covering PatternLab prefix filtering and AiIntegration feature
detection (10 tests, 20 assertions).
Allow filtering the pattern table by category via a GET dropdown;
count badge reflects current filter state vs. total.
PHPUnit 10 requires PHP >=8.1 but the plugin supports PHP 8.0+.
Setting config.platform.php to 8.0.0 ensures the lock file resolves
PHPUnit 9.x which is compatible across the full supported PHP range.
Aligns with WordPress's recommended PHP version (8.3+). Also adds
PHPUnit test step to CI workflow.
@jasperf jasperf merged commit ab493eb into main May 24, 2026
2 checks passed
@jasperf jasperf deleted the feature/phase-1-quick-wins branch May 24, 2026 07:04
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.

1 participant