Skip to content

3.3#90

Merged
mnapoli merged 14 commits intomasterfrom
3.3
Jul 30, 2013
Merged

3.3#90
mnapoli merged 14 commits intomasterfrom
3.3

Conversation

@mnapoli
Copy link
Copy Markdown
Member

@mnapoli mnapoli commented Jul 28, 2013

Coverage Status

@drdamour
Copy link
Copy Markdown
Contributor

injectAll sounds weird...what about injectOn?

@mnapoli
Copy link
Copy Markdown
Member Author

mnapoli commented Jul 30, 2013

I used injectAll because that feature existed in previous versions (< v3). It's short for "inject all dependencies", whereas "inject" is more "inject x into y" and the method takes only one param, so that's confusing.

I'm ok for injectOn. That would even leave the possibility later to add another parameter to specify which dependency to inject. That can be useful for example in the tests, if you are creating an object with mock dependencies, but there is one dependency of that object that you don't want to mock.

@drdamour
Copy link
Copy Markdown
Contributor

I could see that being useful:

$container
->injectOn($target, "dep1")
->injectOn($target, "dep2")
->injectOn($target2)

mnapoli added a commit that referenced this pull request Jul 30, 2013
@mnapoli mnapoli merged commit 48de53e into master Jul 30, 2013
@mnapoli
Copy link
Copy Markdown
Member Author

mnapoli commented Jul 30, 2013

@mnapoli mnapoli added the version label Aug 4, 2014
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.

3 participants