8000 Remove redundant `Connection#connect()` calls by rosier · Pull Request #810 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove redundant Connection#connect() calls #810

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

Merged
merged 1 commit into from
Mar 5, 2015
Merged

Remove redundant Connection#connect() calls #810

merged 1 commit into from
Mar 5, 2015

Conversation

rosier
Copy link
Contributor
@rosier rosier commented Mar 5, 2015

This PR removes a few unneeded calls to Connection::connect()

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-1161

We use Jira to track the state of pull requests and the versions they got
included in.

*
* @throws \Doctrine\DBAL\DBALException
*/
public function prepare($statement)
{
$this->connect();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure about that ? I'm quite sure that preparing a statement requires being connected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Statement::__construct also calls Connection::connect() via Connection::getWrappedConnection()

@Ocramius
Copy link
Member
Ocramius commented Mar 5, 2015

Looks sane to me /cc @deeky666

@stof
Copy link
Member
stof commented Mar 5, 2015

👍

deeky666 added a commit that referenced this pull request Mar 5, 2015
@deeky666 deeky666 merged commit 6b6143b into doctrine:master Mar 5, 2015
@deeky666
Copy link
Member
deeky666 commented Mar 5, 2015

@rosier thanks!

@rosier rosier deleted the remove-unneeded-connect-calls branch March 6, 2015 08:24
@Ocramius Ocramius self-assigned this Jul 22, 2017
@Ocramius Ocramius added this to the 2.6 milestone Jul 22, 2017
@Ocramius Ocramius changed the title Remove unneeded connect calls Remove redundant Connection#connect() calls Jul 22, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 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.

5 participants
0