Skip to content

Commit 2fa21e4

Browse files
committed
AC-9755:Set default collation to utf8mb4 for MySQL
1 parent 4e44b2d commit 2fa21e4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,25 +276,25 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface, Rese
276276
* @param DateTime $dateTime
277277
* @param LoggerInterface $logger
278278
* @param SelectFactory $selectFactory
279-
* @param DtoFactoriesTable $dtoFactoriesTable
280279
* @param array $config
281280
* @param SerializerInterface|null $serializer
281+
* @param DtoFactoriesTable|null $dtoFactoriesTable
282282
*/
283283
public function __construct(
284284
StringUtils $string,
285285
DateTime $dateTime,
286286
LoggerInterface $logger,
287287
SelectFactory $selectFactory,
288-
DtoFactoriesTable $dtoFactoriesTable,
289288
array $config = [],
290-
SerializerInterface $serializer = null
289+
SerializerInterface $serializer = null,
290+
?DtoFactoriesTable $dtoFactoriesTable = null
291291
) {
292292
$this->pid = getmypid();
293293
$this->string = $string;
294294
$this->dateTime = $dateTime;
295295
$this->logger = $logger;
296296
$this->selectFactory = $selectFactory;
297-
$this->columnConfig = $dtoFactoriesTable;
297+
$this->columnConfig = $dtoFactoriesTable ?: ObjectManager::getInstance()->get(DtoFactoriesTable::class);
298298
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(SerializerInterface::class);
299299
$this->exceptionMap = [
300300
// SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

setup/src/Magento/Setup/Model/Installer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class Installer
294294
* @param State $sampleDataState
295295
* @param ComponentRegistrar $componentRegistrar
296296
* @param PhpReadinessCheck $phpReadinessCheck
297-
* @param DtoFactoriesTable $dtoFactoriesTable
297+
* @param DtoFactoriesTable|null $dtoFactoriesTable
298298
* @throws Exception
299299
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
300300
*/
@@ -320,7 +320,7 @@ public function __construct(
320320
State $sampleDataState,
321321
ComponentRegistrar $componentRegistrar,
322322
PhpReadinessCheck $phpReadinessCheck,
323-
DtoFactoriesTable $dtoFactoriesTable
323+
?DtoFactoriesTable $dtoFactoriesTable = null
324324
) {
325325
$this->filePermissions = $filePermissions;
326326
$this->deploymentConfigWriter = $deploymentConfigWriter;
@@ -351,7 +351,7 @@ public function __construct(
351351
* from that ObjectManager gets reset as different steps in the installer will write to the deployment config.
352352
*/
353353
$this->firstDeploymentConfig = ObjectManager::getInstance()->get(DeploymentConfig::class);
354-
$this->columnConfig = $dtoFactoriesTable;
354+
$this->columnConfig = $dtoFactoriesTable ?: ObjectManager::getInstance()->get(DtoFactoriesTable::class);;
355355
}
356356

357357
/**

0 commit comments

Comments
 (0)