diff --git a/.changeset/modern-pigs-matter.md b/.changeset/modern-pigs-matter.md new file mode 100644 index 00000000..22f2d5f8 --- /dev/null +++ b/.changeset/modern-pigs-matter.md @@ -0,0 +1,5 @@ +--- +"@wpengine/wp-graphql-content-blocks": patch +--- + +bug: Fixes fatal error on the Site Health page for the info tab. Caused by a naming of the wrong object key in the Semver package. diff --git a/composer.json b/composer.json index 8a13b89a..d36d4a71 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,8 @@ "require": { "php": ">=7.4", "imangazaliev/didom": "^2.0", - "blakewilson/wp-enforce-semver": "^3.0" + "blakewilson/wp-enforce-semver": "^3.0", + "cweagans/composer-patches": "^1" }, "require-dev": { "brain/monkey": "^2.6", @@ -37,7 +38,8 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, - "phpstan/extension-installer": true + "phpstan/extension-installer": true, + "cweagans/composer-patches": true }, "platform": { "php": "7.4" @@ -58,5 +60,12 @@ "psr-4": { "WPGraphQL\\ContentBlocks\\Unit\\": "tests/unit/" } + }, + "extra": { + "patches": { + "blakewilson/wp-enforce-semver": { + "Fixes version key case": "patches/blakewilson-wp-enforce-semver/semver-object-key-version.patch" + } + } } } diff --git a/composer.lock b/composer.lock index e915b0d0..0c39f70a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9869bdd90f5a813011427a5af0592daa", + "content-hash": "fcd099561ddf8f64d253a2ded87ed329", "packages": [ { "name": "blakewilson/wp-enforce-semver", @@ -51,6 +51,54 @@ }, "time": "2024-07-05T18:56:06+00:00" }, + { + "name": "cweagans/composer-patches", + "version": "1.7.3", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0 || ~2.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "support": { + "issues": "https://github.com/cweagans/composer-patches/issues", + "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" + }, + "time": "2022-12-20T22:53:13+00:00" + }, { "name": "imangazaliev/didom", "version": "2.0.1", diff --git a/patches/blakewilson-wp-enforce-semver/semver-object-key-version.patch b/patches/blakewilson-wp-enforce-semver/semver-object-key-version.patch new file mode 100644 index 00000000..62a3208b --- /dev/null +++ b/patches/blakewilson-wp-enforce-semver/semver-object-key-version.patch @@ -0,0 +1,12 @@ +diff --git a/src/EnforceSemVer.php b/src/EnforceSemVer.php +--- a/src/EnforceSemVer.php ++++ b/src/EnforceSemVer.php (date 1741188709127) +@@ -63,7 +63,7 @@ + */ + if ( + $this->plugin_filename === $item->plugin && +- $this->does_new_version_have_major_change( $item->new_version, $item->Version ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase ++ $this->does_new_version_have_major_change( $item->new_version, $item->version ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + return false; + } else { + return $update;