Skip to content

Conversation

@peterwilsoncc
Copy link
Contributor

Summary

Fixes a couple of PHP Compat issues that I missed in my previous PR:

Details

Changes:

  • Source: html_entity_decode() flags updated to use PHP 8.1+ defaults, fixes PHPCompatibility.ParameterValues.NewHTMLEntitiesFlagsDefault.NotSet
  • Tests: Optional params before required params is deprecated, fixes PHPCompatibility.FunctionDeclarations.RemovedOptionalBeforeRequiredParam.Deprecated80

UI Changes

N/A

QA

?

Setup

Steps

@peterwilsoncc
Copy link
Contributor Author

@agibson-godaddy Sorry, I'm not sure if I had an out of date branch or PEBKAC but I missed an item that the PHP Compat sniffs mark with an error code: the change of defaults on html_entity_decode(). I've pushed a fix for the tests directory while I'm about it.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses PHP compatibility issues by updating html_entity_decode() function calls to explicitly use PHP 8.1+ default flags and fixing deprecated optional parameter declarations in test methods.

  • Updates html_entity_decode() to include explicit flags (ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401)
  • Removes default null values from optional parameters that precede required parameters in test methods

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php Adds explicit flags to html_entity_decode() call for PHP 8.1+ compatibility
tests/integration/API/CacheableAPIBaseTest.php Removes default null values from $filter_value parameters to fix deprecated optional-before-required parameter pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@agibson-godaddy agibson-godaddy mentioned this pull request Dec 5, 2025
2 tasks
@agibson-godaddy agibson-godaddy changed the base branch from master to release/6.0.1 December 5, 2025 13:01
Copy link
Contributor

@agibson-godaddy agibson-godaddy left a comment

Choose a reason for hiding this comment

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

Looks good to me -- thank you!

@agibson-godaddy agibson-godaddy merged commit 7733b23 into godaddy-wordpress:release/6.0.1 Dec 5, 2025
5 checks passed
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.

2 participants