diff --git a/.changeset/smooth-years-love.md b/.changeset/smooth-years-love.md new file mode 100644 index 00000000..1d1b13ac --- /dev/null +++ b/.changeset/smooth-years-love.md @@ -0,0 +1,5 @@ +--- +"@wpengine/wp-graphql-content-blocks": minor +--- + +dev: make `PluginUpdater` namespaced functions PSR-4 compatible. diff --git a/includes/updates/update-callbacks.php b/includes/PluginUpdater/UpdateCallbacks.php similarity index 100% rename from includes/updates/update-callbacks.php rename to includes/PluginUpdater/UpdateCallbacks.php diff --git a/includes/updates/update-functions.php b/includes/PluginUpdater/UpdateFunctions.php similarity index 100% rename from includes/updates/update-functions.php rename to includes/PluginUpdater/UpdateFunctions.php diff --git a/includes/WPGraphQLContentBlocks.php b/includes/WPGraphQLContentBlocks.php index 6434e2fb..25bf5873 100644 --- a/includes/WPGraphQLContentBlocks.php +++ b/includes/WPGraphQLContentBlocks.php @@ -147,8 +147,8 @@ static function () { }//end if }//end if - require_once WPGRAPHQL_CONTENT_BLOCKS_PLUGIN_DIR . 'includes/updates/update-functions.php'; - require_once WPGRAPHQL_CONTENT_BLOCKS_PLUGIN_DIR . 'includes/updates/update-callbacks.php'; + require_once WPGRAPHQL_CONTENT_BLOCKS_PLUGIN_DIR . 'includes/PluginUpdater/UpdateFunctions.php'; + require_once WPGRAPHQL_CONTENT_BLOCKS_PLUGIN_DIR . 'includes/PluginUpdater/UpdateCallbacks.php'; // phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable -- Library bootstraps itself, hence variable is unused. $semver = new \EnforceSemVer\EnforceSemVer( WPGRAPHQL_CONTENT_BLOCKS_PATH ); diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f9d81e69..62cc5e54 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8,19 +8,19 @@ parameters: - message: "#^Access to an undefined property object\\:\\:\\$response\\.$#" count: 1 - path: includes/updates/update-callbacks.php + path: includes/PluginUpdater/UpdateCallbacks.php - message: "#^Function WPGraphQL\\\\ContentBlocks\\\\PluginUpdater\\\\custom_plugin_api_request\\(\\) has invalid return type WPGraphQL\\\\ContentBlocks\\\\PluginUpdater\\\\stdClass\\.$#" count: 1 - path: includes/updates/update-callbacks.php + path: includes/PluginUpdater/UpdateCallbacks.php - message: "#^Function WPGraphQL\\\\ContentBlocks\\\\PluginUpdater\\\\custom_plugin_api_request\\(\\) should return WPGraphQL\\\\ContentBlocks\\\\PluginUpdater\\\\stdClass\\|false but returns array\\|object\\|false\\.$#" count: 2 - path: includes/updates/update-callbacks.php + path: includes/PluginUpdater/UpdateCallbacks.php - message: "#^Function WPGraphQL\\\\ContentBlocks\\\\PluginUpdater\\\\custom_plugin_api_request\\(\\) should return WPGraphQL\\\\ContentBlocks\\\\PluginUpdater\\\\stdClass\\|false but returns object\\.$#" count: 1 - path: includes/updates/update-callbacks.php + path: includes/PluginUpdater/UpdateCallbacks.php