File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Classes/Core/Acceptance/Extension Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 2121use Codeception \Events ;
2222use Codeception \Extension ;
2323use TYPO3 \CMS \Core \Database \ConnectionPool ;
24+ use TYPO3 \CMS \Core \Information \Typo3Version ;
2425use TYPO3 \CMS \Core \Utility \GeneralUtility ;
2526use TYPO3 \TestingFramework \Core \Functional \Framework \DataHandling \DataSet ;
2627use TYPO3 \TestingFramework \Core \Testbase ;
@@ -261,8 +262,15 @@ public function bootstrapTypo3Environment(SuiteEvent $suiteEvent)
261262 $ testbase ->testDatabaseNameIsNotTooLong ($ originalDatabaseName , $ localConfiguration );
262263 if ($ dbDriver === 'mysqli ' || $ dbDriver === 'pdo_mysql ' ) {
263264 $ localConfiguration ['DB ' ]['Connections ' ]['Default ' ]['charset ' ] = 'utf8mb4 ' ;
264- $ localConfiguration ['DB ' ]['Connections ' ]['Default ' ]['tableoptions ' ]['charset ' ] = 'utf8mb4 ' ;
265- $ localConfiguration ['DB ' ]['Connections ' ]['Default ' ]['tableoptions ' ]['collate ' ] = 'utf8mb4_unicode_ci ' ;
265+ if ((new Typo3Version ())->getMajorVersion () >= 12 ) {
266+ // @todo Use this as default when TYPO3 v11 support is dropped.
267+ $ localConfiguration ['DB ' ]['Connections ' ]['Default ' ]['defaultTableOptions ' ]['charset ' ] = 'utf8mb4 ' ;
268+ $ localConfiguration ['DB ' ]['Connections ' ]['Default ' ]['defaultTableOptions ' ]['collation ' ] = 'utf8mb4_unicode_ci ' ;
269+ } else {
270+ // @todo Remove this when TYPO3 v11 support is dropped.
271+ $ localConfiguration ['DB ' ]['Connections ' ]['Default ' ]['tableoptions ' ]['charset ' ] = 'utf8mb4 ' ;
272+ $ localConfiguration ['DB ' ]['Connections ' ]['Default ' ]['tableoptions ' ]['collate ' ] = 'utf8mb4_unicode_ci ' ;
273+ }
266274 }
267275 } else {
268276 // sqlite dbs of all tests are stored in a dir parallel to instance roots. Allows defining this path as tmpfs.
You can’t perform that action at this time.
0 commit comments