Skip to content

Commit b67aa5a

Browse files
committed
chore!: remove GraphQL deprecations
1 parent 8b24dbe commit b67aa5a

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- chore!: Bump minimum required WordPress version to 6.7
77
- chore!: Bump minimum required Gravity Forms version to 2.9.0
88
- chore!: Bump minimum required WPGraphQL version to 2.5.0
9+
- chore!: Removed the following deprecated fields: `FieldWithPhoneFormat._phoneFormatExperimental` field. `FieldWithProductField.productField` field.
10+
- chore!: Changed the following field types: `FieldWithPhoneFormat.phoneFormat` from `PhoneFieldFormatEnum` to `GfPhoneFormat`.
911
- chore: Test compatibility against PHP 8.5.
1012

1113
## [v0.13.4]

src/Type/WPInterface/FieldSetting/FieldWithPhoneFormat.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,15 @@ class FieldWithPhoneFormat extends AbstractFieldSetting {
3838
*/
3939
public static function get_fields(): array {
4040
return [
41-
'phoneFormatType' => [
41+
'phoneFormatType' => [
4242
'type' => PhoneFieldFormatEnum::$type,
4343
'description' => static fn () => __( 'Determines the allowed format for phones. If the phone value does not conform with the specified format, the field will fail validation.', 'wp-graphql-gravity-forms' ),
4444
'resolve' => static fn ( FormField $field ) => $field->gfField->phoneFormat,
4545
],
46-
'phoneFormat' => [
47-
'type' => PhoneFieldFormatEnum::$type,
48-
'deprecationReason' => static fn () => __( 'Use `phoneFormatType` instead. The GraphQL type for this field will change in the next breaking release.', 'wp-graphql-gravity-forms' ),
49-
'description' => static fn () => __( 'Determines the allowed format for phones. If the phone value does not conform with the specified format, the field will fail validation.', 'wp-graphql-gravity-forms' ),
50-
],
51-
'_phoneFormatExperimental' => [
52-
'type' => PhoneFormat::$type,
53-
'description' => static fn () => __( 'The phone format properties. Experimental', 'wp-graphql-gravity-forms' ),
54-
'deprecationReason' => static fn () => __( 'The `phoneFormat` field has been renamed to `phoneFormatType`. The `_phoneFormatExperimental` field will be replaced in a future release.', 'wp-graphql-gravity-forms' ),
55-
'resolve' => static function ( $field ) {
46+
'phoneFormat' => [
47+
'type' => PhoneFormat::$type,
48+
'description' => static fn () => __( 'Determines the allowed format for phones. If the phone value does not conform with the specified format, the field will fail validation.', 'wp-graphql-gravity-forms' ),
49+
'resolve' => static function ( $field ) {
5650
if ( empty( $field->phoneFormat ) ) {
5751
return null;
5852
}

src/Type/WPInterface/FieldSetting/FieldWithProductField.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ class FieldWithProductField extends AbstractFieldSetting {
3636
*/
3737
public static function get_fields(): array {
3838
return [
39-
'productField' => [
40-
'type' => 'Int',
41-
'description' => static fn () => __( 'The id of the product field to which the field is associated.', 'wp-graphql-gravity-forms' ),
42-
'deprecationReason' => static fn () => __( 'Use `connectedProductField` field instead.', 'wp-graphql-gravity-forms' ),
43-
],
4439
'connectedProductField' => [
4540
'type' => 'ProductField',
4641
'description' => static fn () => __( 'The product field to which the field is associated.', 'wp-graphql-gravity-forms' ),

0 commit comments

Comments
 (0)