8000 Remove superfluous Configuration instance by mhitza · Pull Request #3793 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove superfluous Configuration instance #3793

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
Dec 29, 2019
Merged

Remove superfluous Configuration instance #3793

merged 1 commit into from
Dec 29, 2019

Conversation

mhitza
Copy link
Contributor
@mhitza mhitza commented Dec 22, 2019
Q A
Type improvement
BC Break no
Fixed issues

Summary

A configuration instance is not strictly required by DriverManager::getConnection.

As an upside, it doesn't add an extra warning for people that use Psalm/PHPmd when starting off from the documentation example. As the Configuration class has an @internal block those tools threat it as the other meaning for @internal, as in class that is internal to the library and not for public use.

A configuration instance is not strictly required by [DriverManager::getConnection](https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/DriverManager.php#L139).

As an upside, it doesn't add an extra warning for people that use Psalm/PHPmd when starting off from the documentation example. As the Configuration class has an `@internal` block those tools threat it as the other meaning for `@internal`, as in class that is [internal to the library and not for public use](https://docs.phpdoc.org/references/phpdoc/tags/internal.html).
8000
Copy link
Member
@morozov morozov left a comment

Choose a reason for hiding this comment

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

Looks reasonable. I think the only use case when those parameters need to be passed explicitly is duplicating an existing connection. See PortabilityTest.

@morozov morozov added this to the 2.10.1 milestone Dec 29, 2019
@morozov morozov merged commit 7066601 into doctrine:2.10 Dec 29, 2019
@morozov
Copy link
Member
morozov commented Dec 29, 2019

Thanks @mhitza!

@mhitza mhitza deleted the patch-1 branch December 29, 2019 19:51
@morozov morozov self-assigned this Jan 22, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 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
0