SQLiteSchemaManager extends SQLiteSchemaManager uses CustomDoctrineTypesColumnDefinitionTrait, ColumnTypeCommentMethodsTrait

Extending the doctrine SQLiteSchemaManager 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.

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.
_getPortableTableColumnList()  : array<string|int, mixed>
Doctrine DBAL v4 dropped column comment based type api, which TYPO3 still needs. To mitigate this, this method is overridden to reapply the type comment removal, adopted from:
getDatabaseType()  : string
Extract the field type from the definition string
getUnquotedEnumerationValues()  : array<string|int, 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

_getPortableTableColumnList()

Doctrine DBAL v4 dropped column comment based type api, which TYPO3 still needs. To mitigate this, this method is overridden to reapply the type comment removal, adopted from:

protected _getPortableTableColumnList(string $table, string $database, array<string|int, mixed> $tableColumns) : array<string|int, mixed>
  • https://github.com/doctrine/dbal/blob/61446f07fcb522414d6cfd8b1c3e5f9e18c579ba/src/Schema/SqliteSchemaManager.php#L338-L344

by using ColumnTypeCommentMethodsTrait::determineColumnType() to reuse methods.

Parameters
$table : string
$database : string
$tableColumns : array<string|int, mixed>
Return values
array<string|int, mixed>

getDatabaseType()

Extract the field type from the definition string

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

getUnquotedEnumerationValues()

protected getUnquotedEnumerationValues(string $typeDefinition) : array<string|int, mixed>
Parameters
$typeDefinition : string
Return values
array<string|int, 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