8000 Fix incoherent utf8mb4 collation in Doctrine setup by marcverney · Pull Request #7904 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Fix incoherent utf8mb4 collation in Doctrine setup #7904

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

Closed
wants to merge 1 commit into from
Closed

Fix incoherent utf8mb4 collation in Doctrine setup #7904

wants to merge 1 commit into from

Conversation

marcverney
Copy link
Contributor

The "Setting up the Database to be UTF8" section of the "Databases and the Doctrine ORM" page recommends the following default collation setup:

  • in MySQL's my.cnf: collation-server = utf8mb4_general_ci
  • and/or in Symfony's config.yml: collate: utf8mb4_unicode_ci

As a reader I am confused by this difference. If there's a reason for it, I think it should be explained in the text. On the other hand, if there is none, both lines should probably reference utf8mb4_unicode_ci (reason: http://stackoverflow.com/a/766996/2516943). This PR intends to fix the latter case.

@marcverney marcverney changed the title Fix incoherent ut8mb4 collation in Doctrine setup Fix incoherent utf8mb4 collation in Doctrine setup May 14, 2017
Copy link
Member
@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'm not an expert about this, but @marcverney's proposal makes a lot of sense to me.

Copy link
Member
@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds better to me

@xabbuh xabbuh added this to the 2.7 milestone May 15, 2017
@xabbuh
Copy link
Member
xabbuh commented May 17, 2017

Thank you @marcverney.

xabbuh added a commit that referenced this pull request May 17, 2017
…erney)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #7904).

Discussion
----------

Fix incoherent utf8mb4 collation in Doctrine setup

The "Setting up the Database to be UTF8" section of the "Databases and the Doctrine ORM" page recommends the following default collation setup:

- in MySQL's my.cnf: `collation-server = utf8mb4_general_ci`
- and/or in Symfony's config.yml: `collate: utf8mb4_unicode_ci`

As a reader I am confused by this difference. If there's a reason for it, I think it should be explained in the text. On the other hand, if there is none, both lines should probably reference `utf8mb4_unicode_ci` (reason: http://stackoverflow.com/a/766996/2516943). This PR intends to fix the latter case.

Commits
-------

c27f16a Fix incoherent ut8mb4 collation in Doctrine setup
@xabbuh xabbuh closed this May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0