Skip to content

Conversation

@theodesp
Copy link
Member

@theodesp theodesp commented Apr 22, 2025

Description

This PR introduces custom plugin headers for declaring the minimum required and maximum tested versions of WPGraphQL, and wires them into the plugin's initialization logic. This provides better validation and safer bootstrapping when used alongside WPGraphQL.

Added the following custom headers to the main plugin file:

Requires WPGraphQL

WPGraphQL tested up to

How to Test

✅ Ensure WPGraphQL is installed and activated.

✅ Change the version of WPGraphQL (if needed) to simulate:

  • A version lower than Requires WPGraphQL

  • A version higher than WPGraphQL tested up to

✅ Activate the plugin:

  • If the WPGraphQL version is below the required, the plugin should not continue loading and a WP admin notice should appear.

  • If within the compatible range, the plugin should load normally.

✅ Check admin notice behavior:

Go to WP Admin > Plugins and verify the message when versions are incompatible.

Fixes #358

@theodesp theodesp requested a review from a team as a code owner April 22, 2025 14:22
@changeset-bot
Copy link

changeset-bot bot commented Apr 22, 2025

⚠️ No Changeset found

Latest commit: 46c9c60

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@colinmurphy
Copy link
Member

@theodesp

We should also remove and the corresponding patch.

  "extra": {
    "patches": {
      "blakewilson/wp-enforce-semver": {
        "Fixes version key case": "patches/blakewilson-wp-enforce-semver/semver-object-key-version.patch"
      }
    }
  }

@theodesp theodesp requested a review from justlevine April 23, 2025 11:00
@colinmurphy
Copy link
Member

@theodesp

Looks good to me 🚀

Might be worth adding a changeset too for the RP.

@theodesp theodesp merged commit bb3631c into main Apr 24, 2025
13 checks passed
@theodesp theodesp deleted the feat-register_wpgraphql_update_filters branch April 24, 2025 10:05
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.

Update Semver package to use WP GraphQL Semver library

4 participants