Skip to content

Add class aliases for DI #21

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
Nov 13, 2015
Merged

Add class aliases for DI #21

merged 1 commit into from
Nov 13, 2015

Conversation

rkgrep
Copy link
Contributor

@rkgrep rkgrep commented Nov 13, 2015

No description provided.

@arrilot
Copy link
Owner

arrilot commented Nov 13, 2015

Why do we need them if they are already bound into service container?

@rkgrep
Copy link
Contributor Author

rkgrep commented Nov 13, 2015

To allow all types of injection.

app(WidgetFactory::class);
// ...
class MyService
{
    // the same for controller methods
    public function __construct(WidgetFactory $widgets)
    {
        //...
    }
}
app(MyService::class);
// ...

@arrilot
Copy link
Owner

arrilot commented Nov 13, 2015

This is gonna work fine in all current 5.* releases, isn't it?

@arrilot
Copy link
Owner

arrilot commented Nov 13, 2015

I'm a little bit concerned about BC, because i want to support L5.0 as long as possible.

@rkgrep
Copy link
Contributor Author

rkgrep commented Nov 13, 2015

Yes, it will.
You may split code, compatible with 5.0 into a separate branch.

arrilot added a commit that referenced this pull request Nov 13, 2015
@arrilot arrilot merged commit c6626d4 into arrilot:master Nov 13, 2015
@arrilot
Copy link
Owner

arrilot commented Nov 13, 2015

Thanks for explanation.

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.

2 participants