Skip to content

Deprecate Driver::getSchemaManager() in favor of AbstractPlatform::createSchemaManager() #5458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

morozov
Copy link
Member

@morozov morozov commented Jun 20, 2022

Q A
Type improvement, deprecation

The operation of creating a schema manager doesn't belong to the driver layer: the driver represents transport. Different transports use the same schema management logic for the same platform. The very fact that Driver::getSchemaManager() is implemented only in abstract driver classes illustrates that.

At the same time, the schema management logic may depend on the platform vendor and the platform version:

if ($this->_platform instanceof MariaDb1027Platform) {
$columnDefault = $this->getMariaDb1027ColumnDefault($this->_platform, $tableColumn['default']);
} else {
$columnDefault = $tableColumn['default'];
}

But currently, it's challenging to have different schema managers for different platform vendors or versions.

@morozov morozov force-pushed the create-schema-manager branch from 3312545 to 3640bbc Compare June 20, 2022 22:42
@morozov morozov marked this pull request as ready for review June 20, 2022 22:54
@morozov morozov requested review from derrabus and greg0ire June 20, 2022 22:54
@morozov morozov merged commit d66c8b5 into doctrine:3.4.x Jun 21, 2022
@morozov morozov deleted the create-schema-manager branch June 21, 2022 15:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants