Skip to content

Fix PHP 8.6 Reflection deprecation in Private_Access test helper - #14686

Merged
swissspidy merged 1 commit into
mainfrom
fix/php86-reflection-deprecation
Nov 20, 2026
Merged

swissspidy merged 1 commit into
mainfrom
fix/php86-reflection-deprecation

Conversation

@swissspidy

Copy link
Copy Markdown
Collaborator

Summary

Fixes a PHP 8.6 deprecation emitted during PHP integration tests in Private_Access::call_private_method():

Deprecated: Calling ReflectionMethod::invokeArgs() for static method Google\Web_Stories\AMP\Optimization::get_optimizer_configuration() does not need an object parameter

Updates Private_Access::call_private_method() (and Private_Access::get_private_property() for consistency with set_private_property()) to pass null when the reflected method or property is static.

User-facing changes

None.

Testing Instructions

  • This is a non-user-facing change and requires no QA

Reviews

Does this PR have a security-related impact?

No.

Does this PR change what data or activity we track or use?

No.

Does this PR have a legal-related impact?

No.

Checklist

  • This PR addresses an existing issue and I have linked this PR to it
  • I have tested this code to the best of my abilities
  • I have verified accessibility to the best of my abilities (docs)
  • I have verified i18n and l10n (translation, right-to-left layout) to the best of my abilities
  • This code is covered by automated tests (unit, integration, and/or e2e) to verify it works as intended (docs)
  • I have added documentation where necessary
  • I have added a matching Type: XYZ label to the PR

@swissspidy swissspidy added the Type: Infrastructure Changes impacting testing infrastructure or build tooling label Nov 20, 2026
@swissspidy swissspidy added this to the 1.43.0 milestone Nov 20, 2026
@swissspidy
swissspidy merged commit fd383df into main Nov 20, 2026
18 checks passed
@swissspidy
swissspidy deleted the fix/php86-reflection-deprecation branch November 20, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Infrastructure Changes impacting testing infrastructure or build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant