Skip to content
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

Deprecate redundant AbstractPlatform methods #4724

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

morozov
Copy link
Member

@morozov morozov commented Jul 21, 2021

Q A
Type deprecation
BC Break no

This PR primarily deprecates the AbstractPlatform methods that produce the SQL fragments that don't vary across supported platforms (e.g. getCountExpression()COUNT()). The additional reasons to deprecate them are:

  1. They are not used by the DBAL itself. E.g. IS NULL is used as SQL everywhere instead of using getIsNullExpression().
  2. Most of these methods aren't covered by any tests.
  3. These methods don't provide any consistent API. E.g. there are methods for SIN(), COS() and ACOS() but there's no ASIN(), TAN() and so on. Implementing a full set of trigonometric functions in a DBAL would be weird.

It also deprecates a bunch of supports*() methods that describe the features consistently implemented across all the supported platforms (i.e. always return the same value).

Additionally, it documents some more deprecations of the code that is already removed in 4.0.x:

  1. The methods that support the GUID type. The type was deprecated earlier in DBAL 2.8 (see Deprecated usage of DB-generated UUIDs #3212) reverted in Revert GUID type deprecation #4726.
  2. The methods that provide the default and the maximum column lengths on a given platform (see Get rid of hard-coded default values of maximum field lengths #3586).

@morozov morozov merged commit 9fe903d into doctrine:3.2.x Jul 21, 2021
@morozov morozov deleted the deprecate-redundant-platform-methods branch July 21, 2021 15:20
@morozov morozov removed the Types label Jul 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2022
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