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

Revert GUID type deprecation #4726

Merged
merged 2 commits into from
Jul 22, 2021

Conversation

morozov
Copy link
Member

@morozov morozov commented Jul 21, 2021

The APIs related to the GUID column type were mistakenly deprecated in #4724. There are two features in the DBAL related to the GUID type:

  1. Generation of UUID values on the DB side (deprecated in Deprecated usage of DB-generated UUIDs #3212).
  2. Storing UUID values in the database (mistakenly deprecated).

The purpose of the GUID column type in the DBAL is:

  1. Provide a way to store UUID values efficiently on the platforms that support it natively (PostgreSQL, SQL Server). These platforms will store the value in a binary format (effectively, BINARY(16)) and provide automatic parsing and formatting for a better developer experience.
  2. Enable the rest of the platforms to store the UUID value as CHAR(36). This is way less efficient from the storage and lookup perspective than the above but still works.

Without this type in place, the users would have to use either BINARY(16) or CHAR(36) to write portable code which will result in a worse developer experience on the platforms that support the type natively.

Additionally, a functional test is added that covers the type across all supported platforms and identifies a minor inconsistency in their behavior.

@morozov morozov added this to the 3.2.0 milestone Jul 22, 2021
@morozov morozov marked this pull request as ready for review July 22, 2021 00:11
@morozov morozov requested a review from greg0ire July 22, 2021 00:11
@morozov morozov merged commit 1da724b into doctrine:3.2.x Jul 22, 2021
@morozov morozov deleted the revert-guid-type-deprecation branch July 22, 2021 14:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 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