Gravity Forms and PHP 8.1 Compatibility

Compatibility

Gravity Forms is compatible with PHP 8.1.

Known Issues

There are currently no known issues with Gravity Forms and PHP 8.1. Note that all of the issues listed below are fixed in the listed versions of the respective plugins.

  • Return type of Gravity_Forms\Gravity_Forms\External_API\GF_API_Response::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/external-api/class-gf-api-response.phpfixed in 2.6.1.2
  • Return type of GF_Field::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.phpfixed in 2.6.1.2
  • Return type of GF_Field::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.phpfixed in 2.6.1.2
  • Return type of GF_Field::offsetSet($offset, $data) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.phpfixed in 2.6.1.2
  • Return type of GF_Field::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.phpfixed in 2.6.1.2
  • version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in /includes/addon/class-gf-addon.phpfixed in 2.6.1.2
  • Gravity_Forms\Gravity_Forms\License\GF_License_API_Response implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /includes/license/class-gf-license-api-response.phpfixed in 2.6.1.2
  • Constant FILTER_SANITIZE_STRING is deprecated in /includes/duplicate-submissions/class-gf-duplicate-submissions-handler.phpfixed in 2.6.1.2
  • json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /forms_model.phpfixed in 2.6.1.2
  • version_compare(): Passing null to parameter #2 ($version2) of type string is deprecated in /gravityforms.phpfixed in 2.6.1.2
  • Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.phpfixed in 2.6.1.2
  • Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.phpfixed in 2.6.1.2
  • Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetSet($offset, $data) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.phpfixed in 2.6.1.2
  • Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.phpfixed in 2.6.1.2
  • strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /includes/settings/fields/class-base.phpfixed in 2.6.1.2
  • str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /includes/settings/fields/class-base.phpfixed in 2.6.1.2
  • htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /includes/settings/fields/class-text.phpfixed in 2.6.1.2
  • version_compare(): Passing null to parameter #2 ($version2) of type string is deprecated in /includes/system-status/class-gf-update.phpfixed in 2.6.1.2
  • strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /export.phpfixed in 2.6.1.2
  • str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /export.phpfixed in 2.6.1.2
  • dirname(): Passing null to parameter #1 ($path) of type string is deprecated in /includes/addon/class-gf-addon.phpfixed in 2.7.3
  • basename(): Passing null to parameter #1 ($path) of type string is deprecated in /includes/addon/class-gf-addon.phpfixed in 2.7.3
  • strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /includes/assets/class-gf-asset-processor.phpfixed in 2.7.10
  • str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/addon/class-gf-auto-upgrade.phpfixed in 2.7.10
  • str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in common.phpfixed in 2.7.10

Reporting Issues

If you think you have discovered a PHP 8.1-related issue with a Gravity Forms product in your own testing, please let us know by contacting Support. Thank you for contributing!