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

Clean up redundant implements #4323

Merged
merged 1 commit into from
Oct 6, 2020
Merged

Clean up redundant implements #4323

merged 1 commit into from
Oct 6, 2020

Conversation

BenMorel
Copy link
Contributor

@BenMorel BenMorel commented Oct 4, 2020

Q A
Type improvement
BC Break no
Fixed issues none

Summary

ServerInfoAwareConnection extends Connection, so it is redundant to implement both.


BTW, why was ServerInfoAwareConnection changed to extend Connection? I found the old design much better, when interfaces were independent, and connection classes could compose their own set of implementations. What if you need to introduce SomethingElseAwareConnection in the future? Will it extend Connection as well? Sure, you'll still be able to implement both of them and it will work, but will look weird if you ask me.

@morozov
Copy link
Member

morozov commented Oct 6, 2020

@BenMorel see the rationale in #3746.

What if you need to introduce SomethingElseAwareConnection in the future? Will it extend Connection as well?

Yes, but most likely it's not going to happen. I'd like to get rid of this interface entirely. The idea is that the driver connection should instantiate a platform. Whether it's aware of the server version or not; whether DBAL handles different server versions differently, these are implementation details that are of no interest to the API.

@morozov morozov added this to the 3.0.0 milestone Oct 6, 2020
@morozov morozov merged commit c8a5ea7 into doctrine:3.0.x Oct 6, 2020
@morozov
Copy link
Member

morozov commented Oct 6, 2020

Thanks, @BenMorel!

@morozov morozov self-assigned this Oct 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 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.

None yet

2 participants