MySQLSchemaManager extends MySQLSchemaManager uses CustomDoctrineTypesColumnDefinitionTrait, CustomPortableTableIndexesListTrait

Extending the doctrine MySQLSchemaManager to integrate additional processing stuff due to the dropped event system with `doctrine/dbal 4.x`.

For example, this is used to process custom doctrine types.

Platform specific SchemaManager are extended to manipulate the schema handling. TYPO3 needs to do that to provide additional doctrine type handling and other workarounds or alignments. Long time this have been done by using the doctrine EventManager to hook into several places, which no longer exists.

Note: MySQLSchemaManager is used for MySQL and MariaDB. Even doctrine/dbal 4.0 provides no dedicated schema manager for doctrine/dbal 4.0. Keep this in mind.

Internal

not part of the public Core API.

Tags
link
https://github.com/doctrine/dbal/blob/3.7.x/UPGRADE.md#deprecated-not-setting-a-schema-manager-factory
link
https://github.com/doctrine/dbal/blob/3.7.x/UPGRADE.md#deprecated-extension-via-doctrine-event-manager

Table of Contents

Methods

_getPortableTableColumnDefinition()  : Column
Gets Table Column Definition.
_getPortableTableIndexesList()  : array<string, Index>
buildIndex()  : Index
Build a Doctrine Index Object based on the information gathered from the MySQL information schema.
customGetPortableTableIndexesList()  : array<string, Index>
getDatabaseType()  : string
Extract the field type from the definition string
getListTableIndexesSQL()  : string
Copied from `doctrine/dbal 3.x` \Doctrine\DBAL\Platforms\AbstractMySQLPlatform because it has been deprecated and will be removed in `doctrine/dbal 4.x`.
getMySQLTextAndBlobColumnDefault()  : string|null
getUnquotedEnumerationValues()  : array<string|int, mixed>
normalizeTableColumnData()  : array<string, mixed>
processCustomDoctrineTypesColumnDefinition()  : Column|null
This method is used to handle additional processing for custom doctrine types.

Methods

_getPortableTableColumnDefinition()

Gets Table Column Definition.

protected _getPortableTableColumnDefinition(array<string, mixed> $tableColumn) : Column
Parameters
$tableColumn : array<string, mixed>
Return values
Column

_getPortableTableIndexesList()

protected _getPortableTableIndexesList(array<int, array<string, mixed>> $tableIndexes, string $tableName) : array<string, Index>
Parameters
$tableIndexes : array<int, array<string, mixed>>
$tableName : string
Return values
array<string, Index>

buildIndex()

Build a Doctrine Index Object based on the information gathered from the MySQL information schema.

protected buildIndex(array<string|int, mixed> $tableIndexRows) : Index
Parameters
$tableIndexRows : array<string|int, mixed>
Tags
throws
InvalidArgumentException
Return values
Index

customGetPortableTableIndexesList()

protected customGetPortableTableIndexesList(array<string, Index$tableIndexesList, array<int, array<string, mixed>> $tableIndexes, string $tableName, Connection $connection) : array<string, Index>
Parameters
$tableIndexesList : array<string, Index>
$tableIndexes : array<int, array<string, mixed>>
$tableName : string
$connection : Connection
Return values
array<string, Index>

getDatabaseType()

Extract the field type from the definition string

protected getDatabaseType(string $typeDefinition) : string
Parameters
$typeDefinition : string
Return values
string

getListTableIndexesSQL()

Copied from `doctrine/dbal 3.x` \Doctrine\DBAL\Platforms\AbstractMySQLPlatform because it has been deprecated and will be removed in `doctrine/dbal 4.x`.

protected getListTableIndexesSQL(AbstractPlatform $platform, string $table[, string|null $database = null ]) : string
Parameters
$platform : AbstractPlatform
$table : string
$database : string|null = null
Return values
string

getMySQLTextAndBlobColumnDefault()

protected getMySQLTextAndBlobColumnDefault(string|null $columnDefault) : string|null
Parameters
$columnDefault : string|null
Return values
string|null

getUnquotedEnumerationValues()

protected getUnquotedEnumerationValues(string $typeDefinition) : array<string|int, mixed>
Parameters
$typeDefinition : string
Return values
array<string|int, mixed>

normalizeTableColumnData()

protected normalizeTableColumnData(array<string, mixed> $tableColumn, MariaDBPlatform|MySQLPlatform $platform) : array<string, mixed>
Parameters
$tableColumn : array<string, mixed>
$platform : MariaDBPlatform|MySQLPlatform
Return values
array<string, mixed>

processCustomDoctrineTypesColumnDefinition()

This method is used to handle additional processing for custom doctrine types.

protected processCustomDoctrineTypesColumnDefinition(array<string|int, mixed> $tableColumn, AbstractPlatform $platform) : Column|null

Note: doctrine/dbal dropped the event listener system, and this replaces the used onSchemaColumnDefinition() event lower than doctrine/dbal 4.x.

Parameters
$tableColumn : array<string|int, mixed>
$platform : AbstractPlatform
Return values
Column|null

        
On this page

Search results