Deprecate VersionAwarePlatformDriver and ServerInfoAwareConnection #4751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, there are two ways the wrapper
Connection
can instantiate anAbstractPlatform
:VersionAwarePlatformDriver
, use:dbal/src/Connection.php
Line 357 in b38ee5e
dbal/src/Connection.php
Line 360 in b38ee5e
Although these two approaches are mutually exclusive, version-aware drivers have to implement both methods. Additionally, there is an assumption that the driver connection used by all
VersionAwarePlatformDriver
s isServerInfoAwareConnection
which isn't enforced statically and requires runtime type checks assertions.Whether or not the driver instantiates a platform based on the server version should be considered an implementation detail which may change when the support of a new platform version is added or removed. For instance, as of #3756, the SQL Server drivers do not use the server version to instantiate the platform but the connection is still declared as aware of the server version.
This detail doesn't need to be exposed outside of the driver and doesn't deserve an API.