-
Notifications
You must be signed in to change notification settings - Fork 385
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
Fix deprecated _admin_bar_bump_cb
; Fix failing PHP unit tests
#7635
Conversation
941e2bd
to
c6717cd
Compare
0a0fae6
to
30736fe
Compare
…iently Co-authored-by: Weston Ruter <westonruter@google.com>
9dc8eba
to
1301315
Compare
Plugin builds for 82fe088 are ready 🛎️!
|
1301315
to
159a2e0
Compare
- name: Override default PHPUnit configuration | ||
if: ${{ matrix.experimental == true && needs.pre-run.outputs.changed-php-count > 0 }} | ||
run: | | ||
cp phpunit.xml.dist phpunit.xml | ||
|
||
# Avoid converting deprecations, errors, notices, and warnings to exceptions in experimental mode. | ||
sed -i 's/convertDeprecationsToExceptions="true"/convertDeprecationsToExceptions="false"/g' phpunit.xml | ||
sed -i 's/convertErrorsToExceptions="true"/convertErrorsToExceptions="false"/g' phpunit.xml | ||
sed -i 's/convertNoticesToExceptions="true"/convertNoticesToExceptions="false"/g' phpunit.xml | ||
sed -i 's/convertWarningsToExceptions="true"/convertWarningsToExceptions="false"/g' phpunit.xml | ||
working-directory: ${{ env.WP_CORE_DIR }}/src/wp-content/plugins/amp |
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.
😎
return [ 'file' => $file ]; | ||
$file = str_replace( '{{ get_template_directory }}', get_template_directory(), $file ); | ||
$file = str_replace( '{{ get_stylesheet_directory }}', get_stylesheet_directory(), $file ); | ||
|
||
return [ | ||
'file' => $file, | ||
]; |
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.
😎
@@ -454,6 +459,7 @@ public function test_delete_transients( $using_ext_object_cache ) { | |||
'_transient_foo', | |||
'_transient_timeout_bar', | |||
'_transient_timeout_baz', | |||
'_transient_wp_theme_patterns_' . get_stylesheet(), |
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.
Good that you tested this is preserved.
$this->assertFalse( has_action( 'wp_head', $callback ) ); | ||
} | ||
|
||
remove_action( 'wp_print_styles', 'print_emoji_styles' ); |
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.
Could you add a //
comment after this and the other instances in this file just to explain why it is removed for future reference?
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.
Done in 82fe088.
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.
In default-filters.php
in core now, it has:
add_action( 'admin_print_styles', 'print_emoji_styles' ); // Retained for backwards-compatibility. Unhooked by wp_enqueue_emoji_styles().
So isn't this handled by wp_enqueue_emoji_styles()
?
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.
is_admin()
is false at this point.
unset( $GLOBALS['current_screen'] ); |
Co-authored-by: Weston Ruter <westonruter@google.com>
Summary
Fixes #7619
Checklist