#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 |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | minor | Version: | 6.5 |
Component: | Editor | Keywords: | has-patch has-unit-tests dev-feedback |
Focuses: | Cc: |
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.
10 months 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
#3
@
10 months ago
- Owner set to youknowriad
- Resolution set to fixed
- Status changed from new to closed
In 57332:
@youknowriad commented on PR #5911:
10 months ago
#4
Committed in https://core.trac.wordpress.org/changeset/57332
This ticket was mentioned in PR #5950 on WordPress/wordpress-develop by @jorbin.
10 months ago
#9
set_error_handler is a global change that should be cleaned up
Trac ticket: https://core.trac.wordpress.org/ticket/60305
#11
@
7 months 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 cleaned up. throw new Exception( $errstr, $errno ); }, E_ALL );
I'm working on a PR for this ticket.