[wp-trac] [WordPress Trac] #56817: Investigate new test failure in PHP 8.2

WordPress Trac noreply at wordpress.org
Fri Feb 10 14:57:47 UTC 2023


#56817: Investigate new test failure in PHP 8.2
-------------------------------+---------------------
 Reporter:  desrosj            |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  6.2
Component:  General            |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  needs-patch php82  |     Focuses:
-------------------------------+---------------------

Comment (by costdev):

 Changing the `filter_mime_types_woff()` callback in the tests to this
 makes the test pass on PHP 7.4/8.2:

 {{{#!php
 <?php
 if ( PHP_VERSION_ID >= 80200 ) {
         $mimes['woff'] = 'font/woff';
 } else {
         $mimes['woff'] = 'application/font-woff';
 }
 return $mimes;
 }}}

 However, as noted in
 [https://core.trac.wordpress.org/ticket/56817#comment:13 comment:13], on
 PHP 8.1, success will depend on the version of the `fileinfo` extension.

 What is the currently thinking about the desirable end goal?
 - That the accurate PHP/fileinfo-dependent type is returned (`application
 /font-woff` vs `font/woff`)? Or
 - That Core returns a consistent type across all PHP/fileinfo versions
 (`application/font-woff`)?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56817#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list