Skip to content

Tests: Remove TrueType font detection skips for PHP 8.6. - #16039

Closed
desrosj wants to merge 1 commit into
WordPress:trunkfrom
desrosj:fix/66419-remove-ttf-octet-stream-skip
Closed

desrosj wants to merge 1 commit into
WordPress:trunkfrom
desrosj:fix/66419-remove-ttf-octet-stream-skip

Conversation

@desrosj

@desrosj desrosj commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

r65319 added conditional skips to two tests to work around an upstream libmagic regression in PHP 8.6, which caused TrueType fonts to be detected as application/octet-stream (php/php-src#25051). That fix has landed, and PHP 8.6.0RC7 now correctly detects tests/phpunit/data/fonts/OpenSans-Regular.ttf as font/ttf, so the skips are no longer needed.

This removes:

  • The application/octet-stream check in Tests_REST_WpRestFontFacesController::test_create_item_with_multiple_font_files(). The test is restored to its pre-[65319] form, always uploading all 4 formats and asserting exactly 4 src items.
  • The markTestSkipped() in Tests_Functions::test_wp_check_filetype_and_ext_accepts_either_ttf_mime_type().

Testing

On PHP 8.6.0RC7 (wordpressdevelop/php:8.6-fpm):

  • Both affected tests: OK (3 tests, 20 assertions), with no skips.
  • --group font-library,66419: OK (201 tests, 926 assertions).

Trac ticket: https://core.trac.wordpress.org/ticket/66419

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Removing the skips, running the tests on PHP 8.6.0RC7, and drafting the commit and PR description. Changes were reviewed by me.

🤖 Generated with Claude Code


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

The upstream libmagic regression that caused TrueType fonts to be detected as `application/octet-stream` has been fixed in PHP 8.6.0RC7, which now correctly reports `font/ttf`. The conditional skips added to account for this are no longer necessary.

Follow-up to [65319].

See #66419.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desrosj
desrosj marked this pull request as ready for review November 16, 2026 19:50
@desrosj desrosj added the Full PHPUnit Matrix Run the weekly PHPUnit matrix on PRs that match the PHPUnit path filters. label Nov 16, 2026
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@github-actions

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 65539
GitHub commit: 7224d97

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Full PHPUnit Matrix Run the weekly PHPUnit matrix on PRs that match the PHPUnit path filters.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant