Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS6: Default to utf8mb4 #11336

Closed
4 tasks done
maxime-rainville opened this issue Aug 14, 2024 · 4 comments
Closed
4 tasks done

CMS6: Default to utf8mb4 #11336

maxime-rainville opened this issue Aug 14, 2024 · 4 comments

Comments

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Aug 14, 2024

Description

A while back, we put some effort in making easy to set up up your database to store Emojis and fanciful characters in your DB fields. However, we didn't want to force people to upgrade their project to the 4-bit UTF8 charset ... because breaking change.

We did add a better config in recipe-cms so people creating brand new projects would get the 4-bit charset.

However, we forgot to update the default charset and collation in CMS 5 ... so people still have to keep that snippet in their YML config if they want to use 4-bit UTF8 char.

We should update CMS 6 to use 4-bit UTF8 char out of the box.

Additional context or points of discussion

This bit should be removed in CMS 6: https://github.com/silverstripe/recipe-core/blob/5/app/_config/mysite.yml#L7-L16

Instead the matching config values should be set directly in MySQLDatabase:
https://github.com/silverstripe/silverstripe-framework/blob/5/src/ORM/Connect/MySQLDatabase.php#L28-L76

Validations

  • You intend to implement the feature yourself
  • You have read the contributing guide
  • You strongly believe this feature should be in core, rather than being its own community module
  • You have checked for existing issues or pull requests related to this feature (and didn't find any)

Pull request

@GuySartorelli
Copy link
Member

Makes sense to me

@GuySartorelli
Copy link
Member

@maxime-rainville Are you still interested in doing this?

@maxime-rainville
Copy link
Contributor Author

Sorry ... got busy with life, StripeCon presentation and screaming at AWS over the last two months. Just got a bunch of PR for this one.

@GuySartorelli GuySartorelli self-assigned this Oct 20, 2024
@GuySartorelli
Copy link
Member

PRs merged. Thanks for taking care of that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants