From b37338a8047530baa20e72f9d34d81d357501df6 Mon Sep 17 00:00:00 2001 From: Jason Bahl Date: Thu, 14 Mar 2024 18:50:26 -0600 Subject: [PATCH 1/2] - update versions/changelog for release --- CHANGELOG.md | 12 ++++++++++++ readme.txt | 14 +++++++++++++- wpgraphql-acf.php | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4de0060..c686270 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 2.2.0 + +## New Features + +- [#181](https://github.com/wp-graphql/wpgraphql-acf/pull/181): feat: update docs Date fields to link to the RFC3339 spec + +### Chores / Bugfixes + +- [#182](https://github.com/wp-graphql/wpgraphql-acf/pull/182): fix: admin_enqueue_scripts callback should expect a possible null value passed to it +- [#185](https://github.com/wp-graphql/wpgraphql-acf/pull/185): fix: clone field within a group field type returns null values +- [#189](https://github.com/wp-graphql/wpgraphql-acf/pull/189): fix: image fields (and other connection fields) not properly resolving when queried asPreview + ## 2.1.2 ### Chores / Bugfixes diff --git a/readme.txt b/readme.txt index cfd36fb..0f24915 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: GraphQL, ACF, API, NextJS, Faust, Headless, Decoupled, React, Vue, Svelte, Requires at least: 6.0 Tested up to: 6.4 Requires PHP: 7.4 -Stable Tag: 2.1.2 +Stable Tag: 2.2.0 License: GPL-3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -116,6 +116,18 @@ This release is a complete re-architecture of WPGraphQL for ACF, introducing bre == Changelog == += 2.2.0 = + +**New Features** + +- [#181](https://github.com/wp-graphql/wpgraphql-acf/pull/181): feat: update docs Date fields to link to the RFC3339 spec + +**Chores / Bugfixes** + +- [#182](https://github.com/wp-graphql/wpgraphql-acf/pull/182): fix: admin_enqueue_scripts callback should expect a possible null value passed to it +- [#185](https://github.com/wp-graphql/wpgraphql-acf/pull/185): fix: clone field within a group field type returns null values +- [#189](https://github.com/wp-graphql/wpgraphql-acf/pull/189): fix: image fields (and other connection fields) not properly resolving when queried asPreview + = 2.1.2 = **Chores / Bugfixes** diff --git a/wpgraphql-acf.php b/wpgraphql-acf.php index 9a82967..dadb73b 100644 --- a/wpgraphql-acf.php +++ b/wpgraphql-acf.php @@ -4,7 +4,7 @@ * Description: WPGraphQL for ACF seamlessly integrates Advanced Custom Fields with WPGraphQL. * Author: WPGraphQL, Jason Bahl * Author URI: https://www.wpgraphql.com - * Version: 2.1.2 + * Version: 2.2.0 * Text Domain: wpgraphql-acf * Requires PHP: 7.3 * Requires at least: 5.9 @@ -31,7 +31,7 @@ } if ( ! defined( 'WPGRAPHQL_FOR_ACF_VERSION' ) ) { - define( 'WPGRAPHQL_FOR_ACF_VERSION', '2.1.2' ); + define( 'WPGRAPHQL_FOR_ACF_VERSION', '2.2.0' ); } if ( ! defined( 'WPGRAPHQL_FOR_ACF_VERSION_WPGRAPHQL_REQUIRED_MIN_VERSION' ) ) { From 43b778d2cf28d02068b0ee6181474a4e5f09d3e0 Mon Sep 17 00:00:00 2001 From: Jason Bahl Date: Thu, 14 Mar 2024 21:40:54 -0600 Subject: [PATCH 2/2] - update test to check if the test implements functions before setting up the test --- tests/_support/WPUnit/AcfFieldTestCase.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/_support/WPUnit/AcfFieldTestCase.php b/tests/_support/WPUnit/AcfFieldTestCase.php index 8379794..7a8f601 100644 --- a/tests/_support/WPUnit/AcfFieldTestCase.php +++ b/tests/_support/WPUnit/AcfFieldTestCase.php @@ -1051,13 +1051,6 @@ public function testQueryFieldOnPostReturnsExpectedValue() { public function testQueryFieldOnPostAsPreviewReturnsExpectedValue() { - // disable the block editor - add_filter('use_block_editor_for_post', '__return_false'); - - $field_key = $this->register_acf_field(); - - // Save data to the post - update_field( $field_key, $this->get_data_to_store(), $this->published_post->ID ); $fragment = $this->get_query_fragment(); @@ -1083,6 +1076,14 @@ public function testQueryFieldOnPostAsPreviewReturnsExpectedValue() { $this->markTestIncomplete( 'get_preview_data_to_store() not defined' ); } + // disable the block editor + add_filter('use_block_editor_for_post', '__return_false'); + + $field_key = $this->register_acf_field(); + + // Save data to the post + update_field( $field_key, $this->get_data_to_store(), $this->published_post->ID ); + $query = ' query AcfFieldOnPost ($id: ID! $asPreview:Boolean) { post( id: $id idType: DATABASE_ID asPreview: $asPreview) {