Skip to content

Commit ab6057c

Browse files
committed
Specify charset when using MySQL
Because of backward-compatibility reasons, not specifying the charset will result in "utf8" being used, which is a deprecated charset. Also, when the charset for creating tables is not specified, the one specified in the DSN is reused if specified. In the future, DBAL is going to drop default values, which means we will have to specify a charset anyway.
1 parent fadeac1 commit ab6057c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doctrine/doctrine-bundle/2.4/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
1212
"#3": "",
1313
"#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"",
14-
"#5": "DATABASE_URL=\"mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7\"",
14+
"#5": "DATABASE_URL=\"mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7&charset=utf8mb4\"",
1515
"DATABASE_URL": "postgresql://symfony:[email protected]:5432/app?serverVersion=13&charset=utf8"
1616
},
1717
"dockerfile": [

0 commit comments

Comments
 (0)