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

Support lazy-loading of internal dependencies #3

Open
Ocramius opened this issue Apr 12, 2016 · 1 comment
Open

Support lazy-loading of internal dependencies #3

Ocramius opened this issue Apr 12, 2016 · 1 comment

Comments

@Ocramius
Copy link

This might be a really hard one to solve, but the idea is simple: lazy services are not necessarily the front-facing services inside your app.

Let's say you have a class:

class MyService
{
    public function __construct(SomethingSlow $iWantThisToBeLazy) {}
}

This kind of container currently only allows MyService to be fetched lazily, but doesn't allow the internal dependency to SomethingSlow to be replaced with a lazy instance.

This problem may not be solvable by the lib as-is, but it is a good scope for research, and it may spawn into further development of the container-interop standard.

@snapshotpl
Copy link
Owner

👍 I will write test for that

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

No branches or pull requests

2 participants