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

Merged
merged 1 commit into from
Nov 5, 2024

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

@jonwaldstein jonwaldstein changed the base branch from develop to release/3.17.2 November 5, 2024 15:53
@jonwaldstein jonwaldstein merged commit 1b7a083 into release/3.17.2 Nov 5, 2024
20 checks passed
@jonwaldstein jonwaldstein deleted the fix/php-warnings-json-serialize branch November 5, 2024 15:53
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