-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Webfonts] Use Core's _deprecated_argument()
for deprecating data structures
#47125
[Webfonts] Use Core's _deprecated_argument()
for deprecating data structures
#47125
Conversation
_deprecated_function()
for deprecating data structures_deprecated_argument()
for deprecating data structures
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.
Code looks good, but the PR should be rebased since the file has been moved
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.
This tests well! 🐑
141b1f4
to
19d0f57
Compare
Rebased to |
Flaky tests detected in 19d0f57. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3987197064
|
The failure on the "React Native E2E Tests (Android)" are unrelated to this PR. Restarting that CI Job for the third time. But it fails again, will ignore and merge this PR. |
Fixes #47123.
What?
Use Core's
_deprecated_argument()
instead oftrigger_error()
for deprecating data structures. This is similar to how deprecated functions in the API's BC layer uses Core's_deprecated_function()
.Why?
To avoid filling server logs on production sites.
_deprecated_argument()
is Core's standard and will only display the deprecation whenWP_Debug
is on.How?
See above.
Testing Instructions
With
WP_Debug
off:Now turn on
WP_Debug
:Repeat steps 1-5. Notice there are deprecations.
Testing Instructions for Keyboard
Screenshots or screencast