-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Script Modules: Fix private method reflection access #62154
Script Modules: Fix private method reflection access #62154
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/experimental/script-modules.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Set private reflection methods to accessible * Set private reflection methods to accessible
* Set private reflection methods to accessible * Set private reflection methods to accessible
What?
Set private methods accessed through reflection to accessible before invoking.
Why?
This cases an error in some PHP versions: https://github.com/WordPress/gutenberg/pull/61658/files#r1621194664
How?
Setting the methods to accessible fixes the issue.
Testing Instructions
Go to the playground:
https://playground.wordpress.net/gutenberg.html
Put this PR number in the form:
62154
Change the playground PHP version to 7.2.
Try using the Interactivity API on the playground site. You can check the error logs on the site to ensure there are no errors related to private method access.