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

Aliases and proxying #58

Closed
bachpedersen opened this issue Apr 6, 2013 · 5 comments
Closed

Aliases and proxying #58

bachpedersen opened this issue Apr 6, 2013 · 5 comments
Labels
bug
Milestone

Comments

@bachpedersen
Copy link

@bachpedersen bachpedersen commented Apr 6, 2013

Hi
If you define an alias it is currently not possible to use proxies.

Eg.
Container::getInstance()->get('\Namespace\SomeClassAlias', true) will always create an new instance of the class pointed to by SomeClassAlias.

Getting a proxy instead would be a nice improvement imo..

@mnapoli
Copy link
Member

@mnapoli mnapoli commented Apr 7, 2013

Thanks for reporting it.

Just one thing, there is a V3.0 being worked on right now (see #51) with big changes, so do you think you will switch to 3.0 once it's available or stay with 2.0 (knowing that there are big BC breaks so there's work involved to switch)? Or if this issue is critical for you I can look into it for V2.0.

I'm asking that because if you don't plan on staying on V2.0 then the fix could just be applied to V3.0, else I can backport the fix.

@bachpedersen
Copy link
Author

@bachpedersen bachpedersen commented Apr 7, 2013

V3 looks promising, I will switch at some point so no reason to backport imo.

@mnapoli
Copy link
Member

@mnapoli mnapoli commented Apr 7, 2013

Noted, will be fixed in 3.0 then

mnapoli added a commit that referenced this issue Apr 7, 2013
@mnapoli
Copy link
Member

@mnapoli mnapoli commented Apr 7, 2013

I was able to reproduce in 2.0, I added the tests in 3.0 but it was fixed by the refactoring, so fixed in 3.0.

@mnapoli mnapoli closed this Apr 7, 2013
mnapoli pushed a commit that referenced this issue Apr 14, 2013
@mnapoli
Copy link
Member

@mnapoli mnapoli commented Apr 23, 2013

HI!

FYI 3.0 is now stable and released with the bugfix for this issue.

Have a look at http://mnapoli.github.io/PHP-DI/ for more infos on the new functionalities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.