#60305 closed enhancement (fixed)
Ensure that `Tests_Theme_wpThemeJson::test_set_spacing_sizes_should_detect_invalid_spacing_scale` is compatible with PHPUnit 10
| Reported by: | antonvlasenko | Owned by: | youknowriad |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | Editor | Version: | 6.5 |
| Severity: | minor | Keywords: | has-patch has-unit-tests dev-feedback |
| Cc: | Focuses: |
Description
The test_set_spacing_sizes_should_detect_invalid_spacing_scale() test method is incompatible with PHPUnit 10 because the TestCase::expectNotice() method is deprecated.
The changes from https://github.com/WordPress/gutenberg/pull/55354 need to be backported for that test method to Core to ensure compatibility with PHP 10.
Change History (11)
This ticket was mentioned in PR #5911 on WordPress/wordpress-develop by @antonvlasenko.
3 years ago
#2
- Keywords has-patch has-unit-tests added; needs-patch removed
This PR aims to backport https://github.com/WordPress/gutenberg/pull/55354 to Core to ensure that Tests_Theme_wpThemeJson::test_set_spacing_sizes_should_detect_invalid_spacing_scale is compatible with PHPUnit 10
Trac ticket: https://core.trac.wordpress.org/ticket/60305#comment:1
@youknowriad commented on PR #5911:
3 years ago
#4
Committed in https://core.trac.wordpress.org/changeset/57332
This ticket was mentioned in PR #5950 on WordPress/wordpress-develop by @jorbin.
3 years ago
#9
set_error_handler is a global change that should be cleaned up
Trac ticket: https://core.trac.wordpress.org/ticket/60305
#11
@
3 years ago
- Keywords dev-feedback added
@jorbin I believe it might be worth considering a revert of https://core.trac.wordpress.org/changeset/57361, as it appears that its code does not get executed.
The handler is already being cleaned up within the new error handler itself:
set_error_handler(
static function ( $errno, $errstr ) {
restore_error_handler(); // <-- This is where it's cleared up.
throw new Exception( $errstr, $errno );
},
E_ALL
);
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I'm working on a PR for this ticket.