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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@mnapoli

mnapoli Apr 7, 2013

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@bachpedersen

bachpedersen Apr 7, 2013

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

bachpedersen commented Apr 7, 2013

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

@mnapoli

This comment has been minimized.

Show comment
Hide comment
@mnapoli

mnapoli Apr 7, 2013

Member

Noted, will be fixed in 3.0 then

Member

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

This comment has been minimized.

Show comment
Hide comment
@mnapoli

mnapoli Apr 7, 2013

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@mnapoli

mnapoli Apr 23, 2013

Member

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.

Member

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