Skip to content

interfaceInjectionEnabled="false" in the service disables interface injection #547

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

Conversation

lsmith77
Copy link
Contributor

interfaceInjectionEnabled="false" (defaults to true) in the service definition disables interface injection

see #544 for more discussion on that topic and yet more links to other discussions :)

@kriswallsmith
Copy link
Contributor

Looks good to me. I would just change the semantics to interface_injection: false or interface-injection="false" or ->disableInterfaceInjection().

@lsmith77
Copy link
Contributor Author

yeah .. would be more consistent with abstract and synthetic

@lsmith77
Copy link
Contributor Author

it seems PHPDumper also needs to be fixed.
but @schmittjoh is opposed to this change conceptually, there is little point to work on it further.

the point is that right now interface injection prevents granular dependency management, which imho is unacceptable. worse yet this breaks my solution for fixing the same issue with people injecting the container (aka ContainerWrapperBundle). i think we are perverting DI and the DIC concept and i want some way to regain control.

sorry for the rant.

@avalanche123
Copy link
Contributor

I am 👍 on the change as long as PHPDumper gets updated too. I don't think it is useful to be able to disable interface injection, but I don't see how else you could avoid automatic injection. I'll read up on how other container get around this and post my thoughts here

@lsmith77
Copy link
Contributor Author

closing since we will remove interface injection

@lsmith77 lsmith77 closed this Apr 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants