DBAL-867: Doctrine\DBAL\Driver\Connection should be marked as an internal interface #2105

Open
doctrinebot opened this Issue Apr 16, 2014 · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user stof:

Currently, the main entry point Doctrine\DBAL\Connection is documented as a wrapper around Doctrine\DBAL\Driver\Connection.
This is very misleading and encourages other library to typehint against Doctrine\DBAL\Driver\Connection rather than Doctrine\DBAL\Connection. See symfony/symfony#10720 for the original discussion.

However, the discussion in #414 (comment) implies that they should actually not be related together (but it cannot be fixed for BC reasons). The phpdoc should at least be changed

@doctrinebot

Comment created by @guilhermeblanco:

This issue was fixed some time ago.

Commit reference: 5fdedc4

@doctrinebot

Comment created by @deeky666:

[~guilhermeblanco] How is your commit reference related to this issue?

@doctrinebot

Comment created by @guilhermeblanco:

[deeky666] The suggestion about Doctrine\DBAL\Connection and Doctrine\DBAL\Driver\Connection started around the misleading support of ping and how to consistently support it across different drivers.
The commit reference I pointed out is [
beberlei]'s resolution to remove misleading phpdoc around ping support (which is also highlighted in the ticket as "phpdoc should at least be changed").
If there's anything else that is missing, I'm probably not seeing. All I've done is followed dbal's discussion. =\

@doctrinebot

Comment created by stof:

Your commit does not fix it at all. [~beberlei]'s comment was about the ping method only indeed. But he explained that Doctrine\DBAL\Connection should actually not be a Doctrine\DBAL\Driver\Connection except for legacy reasons, which is why makign it implement Doctrine\DBAL\Driver\PingableConnection was a bad idea even if it has a ping method.

My issue is related to the description of the class itself: https://github.com/doctrine/dbal/blob/aa2ed45ade6582a24e4f72f674f6989873d72112/lib/Doctrine/DBAL/Connection.php#L36
It still describes it as a wrapper around the driver connection, making other devs think that the right typehint in other libraries is the internal driver connection. See the discussion in the Symfony PR I linked

@doctrinebot

Comment created by @guilhermeblanco:

So... it's reopened. I'll look into this later today.

@doctrinebot

Comment created by @ocramius:

[~guilhermeblanco] can you re-check this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment