Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: fix php jsonSerialize warning for currency switcher setting #7598

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jonwaldstein
Copy link
Contributor

Description

This adds the ReturnTypeWillChange flag to supress this warning:

PHP Deprecated:  Return type of Give\Framework\FieldsAPI\Properties\DonationForm\CurrencySwitcherSetting::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jonwaldstein/Herd/givewp/wp-content/plugins/give/src/Framework/FieldsAPI/Properties/DonationForm/CurrencySwitcherSetting.php on line 47

Affects

php 8.1 compatibility with the CurrencySwitcherSetting class

Visuals

N/A

Testing Instructions

Make sure the warning does not show up when interacting with the form & currency switcher.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant