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 AbstractPlatform::hasNative*Type() and Type::requiresSQLCommentHint() #5509

Merged
merged 2 commits into from
Jul 16, 2022

Conversation

morozov
Copy link
Member

@morozov morozov commented Jul 16, 2022

Type::requiresSQLCommentHint() is not needed as of #5107. AbstractPlatform::hasNative*Type() is only used to implement Type::requiresSQLCommentHint().

@morozov morozov added this to the 3.4.0 milestone Jul 16, 2022
@morozov morozov marked this pull request as ready for review July 16, 2022 01:06
@morozov morozov merged commit 6f49ade into doctrine:3.4.x Jul 16, 2022
@morozov morozov deleted the deprecate-requires-sql-comment-hint branch July 16, 2022 14:21
@chalasr
Copy link
Contributor

chalasr commented Jul 17, 2022

Hi 👋 The hasNativeGuidType method is used by symfony/uid to determine how uids should be stored.
Since there is no replacement, could you reconsider this change ?

fabpot added a commit to symfony/symfony that referenced this pull request Jul 20, 2022
…eGuidType()` (derrabus)

This PR was merged into the 5.4 branch.

Discussion
----------

[DoctrineBridge] Avoid calling `AbstractPlatform::hasNativeGuidType()`

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Follows doctrine/dbal#5509, alternative to doctrine/dbal#5518
| License       | MIT
| Doc PR        | N/A

`AbstractPlatform::hasNativeGuidType()` has been deprecated in Doctrine DBAL. This PR inlines the logic of that method where we need it.

Furthermore, I took the liberty to refactor the corresponding tests a little. We don't really need to mock `AbstractPlatform` because we can work with actual instances. This also allows us to test the behavior of our implementation on different platforms.

Commits
-------

5d882ce Avoid calling AbstractPlatform::hasNativeGuidType()
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 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.

None yet

3 participants