? Success

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
28 Feb 2016

Summary of Changes

This changes the utf8mb4 general encoding to uft8mb4 unicode encoding - it is generally encouraged over general encoding because it sorts better in foreign languages (see http://stackoverflow.com/a/766996 for example)

Testing Instructions

This shouldn't affect either installation or upgrading from a previous version of Joomla.

avatar wilsonge wilsonge - open - 28 Feb 2016
avatar wilsonge wilsonge - change - 28 Feb 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Feb 2016
Labels Added: ?
avatar richard67
richard67 - comment - 28 Feb 2016

Ah, just opened #9245 for the same issue. My code is already ok.

Question: What about unit tests?

I found "utf8_general_ci" in following files:

tests\unit\suites\database\driver\mysql\JDatabaseDriverMysqlTest.php: 'utf8_general_ci',
tests\unit\suites\database\driver\mysql\JDatabaseExporterMysqlTest.php: 'Collation' => 'utf8_general_ci',
tests\unit\suites\database\driver\mysql\JDatabaseImporterMysqlTest.php: 'Collation' => 'utf8_general_ci',
tests\unit\suites\database\driver\mysqli\JDatabaseDriverMysqliTest.php: $this->equalTo('utf8_general_ci'),
tests\unit\suites\database\driver\mysqli\JDatabaseExporterMysqliTest.php: 'Collation' => 'utf8_general_ci',
tests\unit\suites\database\driver\mysqli\JDatabaseImporterMysqliTest.php: 'Collation' => 'utf8_general_ci',
tests\unit\suites\database\driver\pdomysql\JDatabaseDriverPdomysqlTest.php: $this->equalTo('utf8_general_ci'),
tests\unit\suites\database\driver\pdomysql\JDatabaseExporterPdomysqlTest.php: 'Collation' => 'utf8_general_ci',
tests\unit\suites\database\driver\pdomysql\JDatabaseImporterPdomysqlTest.php: 'Collation' => 'utf8_general_ci',


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9246.

avatar richard67
richard67 - comment - 28 Feb 2016

And if we use yours, not forget to change the create table statement I have added to the installer's database model, and this one is still created as utf8_ ..., not as utf8mb4, same as my new update sql, see my files in PR #9245

avatar wilsonge wilsonge - change - 28 Feb 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-02-28 20:17:01
Closed_By wilsonge
avatar wilsonge wilsonge - close - 28 Feb 2016
avatar wilsonge wilsonge - close - 28 Feb 2016
avatar wilsonge wilsonge - head_ref_deleted - 28 Feb 2016
avatar wilsonge
wilsonge - comment - 28 Feb 2016

We'll use yours

avatar richard67
richard67 - comment - 28 Feb 2016

And what shall we do with the unit tests?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9246.

avatar richard67
richard67 - comment - 28 Feb 2016

Does the database used for those support utf8mb4?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9246.

avatar wilsonge
wilsonge - comment - 28 Feb 2016

We use SQLite for the unit tests. This Drupal issue suggests that it is supported https://www.drupal.org/node/1314214

avatar richard67
richard67 - comment - 28 Feb 2016

Does it mean we should change the unit tests, too, to either utf8mb4_unicode_ci?

And if so, in this or in a new PR?

Or leave them untouched because they just check what they created before themselves, e.g. test tables, so what Joomla! Core tables normally have is not relevant for them?

I did not look into them yet and also not know anything about Joomla!'s unit tests.

avatar mbabker
mbabker - comment - 28 Feb 2016

The MySQL servers on Jenkins and Travis should be running MySQL 5.5 so for
MySQL specific tests it should be safe to change. Basically only the
database driver tests should still be using MySQL connections. Everything
else in the unit test suite should be using a SQLite in-memory database
that's set up when the tests start and goes away when it ends.

Presumably, the tests should validate both utf8 and utf8mb4 configurations
at some point.

On Sunday, February 28, 2016, Richard Fath notifications@github.com wrote:

Does it mean we should change the unit tests, too, to either utf8mb4_
unicode_ci?

And if so, in this or in a new PR?

Or leave them untouched because they just check what they created before
themselves, e.g. test tables, so what Joomla! Core tables normally have is
not relevant for them?

I did not look into them yet and also not know anything about Joomla!'s
unit tests.


Reply to this email directly or view it on GitHub
#9246 (comment).

avatar wilsonge
wilsonge - comment - 28 Feb 2016

The problem is the filter runs based on whether the database supports utf8mb4. Not whether they are actually set up with that configuration or not... :(

avatar richard67
richard67 - comment - 28 Feb 2016

Oh my god ... gets too complicated for me ... have no knowledge about unit testing of Joomla! ... I think I am out here ... all I hope is that our recent fixes for unicode collations and utf8mb4 not break any unit tests.

Add a Comment

Login with GitHub to post a comment