Skip to content

Conversation

@noraconley
Copy link
Collaborator

Description of the Change

  • Update plugin compatibility PHP 8.3.
  • Confirms compatibility with PHP 7.0.

Closes #3

How to test the Change

Environments

  • Test in environment with PHP 8.3 (used Local WP)
  • Test in environment with 7.0 (used WP Local Docker v2)

wp-config constants:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );

Steps:

  • Connect via API Key
  • Update plugin settings
  • Place a widget signup form (used Twenty Twenty-One theme)
  • Sign up to list via frontend form

Acceptance

  • Ensure no errors on display
  • Ensure no errors in logs
    • If using Query Monitor, version 3.10 is the most recent version to support PHP 7.0

Changelog Entry

Added - PHP 8.3 compatibility
Added - Minimum PHP version of 7.0

Credits

@nateconley

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change. - n/a, updated minimum PHP version
  • All new and existing tests pass.

@noraconley noraconley requested a review from dkotter June 10, 2024 23:52
@noraconley noraconley self-assigned this Jun 10, 2024
@github-actions github-actions bot added this to the 1.6.0 milestone Jun 10, 2024
@github-actions github-actions bot added the needs:code-review This requires code review. label Jun 10, 2024
@jeffpaul
Copy link
Collaborator

Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me but in testing, received one PHP warning when submitting the form: Undefined array key "phone_format" in /oss/app/public/wp-content/plugins/mailchimp/mailchimp.php on line 992

@noraconley
Copy link
Collaborator Author

This looks good to me but in testing, received one PHP warning when submitting the form: Undefined array key "phone_format" in /oss/app/public/wp-content/plugins/mailchimp/mailchimp.php on line 992

@dkotter I resolved this and another issue with options. One thing that I have noticed through testing this last bit of feedback is that we should be testing with multiple Mailchimp accounts.

I have added custom merge vars for testing on my own 10up Mailchimp account. Even after not including the phone field in the form, I do not see the reported error.

The OSS Mailchimp account does not have those additional merge vars, and it does throw that error.

Additionally, I found an issue where some settings are not saving properly due to strict comparisons and the output returned from get_option. This has been resolved and pushed to this branch.

@dkotter dkotter merged commit 00b1321 into develop Jun 11, 2024
@dkotter dkotter deleted the feat/php-compat branch June 11, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PHP 8 compatibility

4 participants