Skip to content

Commit

Permalink
Merge pull request #47 from beheist/dev-bh-fix-utf8mb4-warning
Browse files Browse the repository at this point in the history
BUGFIX: Adapt db charset warning to new default utf8mb4
  • Loading branch information
kitsunet authored May 4, 2018
2 parents e9a224a + d6d7029 commit ee4a75b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ public function getMetadataAction($driver, $user, $password, $host, $databaseNam
$result = ['level' => 'error', 'message' => sprintf('Only MySQL/MariaDB and PostgreSQL are supported, the selected database is "%s".', $databasePlatform->getName())];
}
if (isset($databaseCharacterSet)) {
if ($databaseCharacterSet === 'utf8') {
$result = ['level' => 'notice', 'message' => 'The selected database\'s character set is set to "utf8" which is the recommended setting.'];
if ($databaseCharacterSet === 'utf8mb4') {
$result = ['level' => 'notice', 'message' => 'The selected database\'s character set is set to "utf8mb4" which is the recommended setting.'];
} else {
$result = [
'level' => 'warning',
'message' => sprintf('The selected database\'s character set is "%s", however changing it to "utf8" is urgently recommended. This setup tool won\'t do this for you.', $databaseCharacterSet)
'message' => sprintf('The selected database\'s character set is "%s", however changing it to "utf8mb4" is urgently recommended. This setup tool won\'t do this for you.', $databaseCharacterSet)
];
}
}
Expand Down

0 comments on commit ee4a75b

Please sign in to comment.