Skip to content

[5.x] Fix failing tests due to lowercase utf-8 charset - #13213

Merged
jasonvarga merged 4 commits into
5.xfrom
content-type-charset
Nov 30, 2025
Merged

jasonvarga merged 4 commits into
5.xfrom
content-type-charset

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Nov 28, 2025 •

Copy link
Copy Markdown
Member

Symfony 8.4.0 was released yesterday. As part of the release, the default charset for text responses (UTF-8) was changed into lowercase.

This causes some of our prefer-stable tests to fail on CI.

This pull request fixes the tests by adding a assertContentType() macro to the TestResponse class which converts utf-8 to UTF-8 if necessary.

Adds `assertContentType` macro to swap out "utf-8" for "UTF-8" on older versions of Symfony.
@jasonvarga
jasonvarga marked this pull request as ready for review November 30, 2025 18:55
@jasonvarga
jasonvarga merged commit db9856f into 5.x Nov 30, 2025
25 checks passed
@jasonvarga
jasonvarga deleted the content-type-charset branch November 30, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants