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

Autowire connections by argument type and name #1296

Merged
merged 1 commit into from Mar 8, 2021
Merged

Autowire connections by argument type and name #1296

merged 1 commit into from Mar 8, 2021

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Feb 19, 2021

Similar to #1259 this will allow autowiring connections by argument type and name which is useful when you don't want to use the ORM and have multiple DBAL connections:

use Doctrine\DBAL\Connection;

class Foo
{
    public function __construct(Connection $myNameConnection) {}
}

The last PR was a little controversial but I'd still like to hear peoples thoughts on this one.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Sweet :)
Failures are unrelated.

@ostrolucky ostrolucky merged commit a8020a0 into doctrine:2.3.x Mar 8, 2021
@HypeMC HypeMC deleted the autowire-connection-by-argument-type-and-name branch March 8, 2021 21:58
@ostrolucky ostrolucky added this to the 2.3.0 milestone Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants