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

Reference constructor #53

Closed
SamMousa opened this issue Oct 25, 2018 · 1 comment
Closed

Reference constructor #53

SamMousa opened this issue Oct 25, 2018 · 1 comment
Labels
status:ready for adoption Feel free to implement this issue. type:enhancement Enhancement

Comments

@SamMousa
Copy link
Contributor

Currently Reference has 2 constructors, 1 static one and 1 non-static one.

I imagine the static one was added mostly for syntactic sugar:

$container->get(Reference::to('someService')); 
// vs
$container->get(new Reference('someService'));

If we decide to support this syntax then in my opinion we should make the __construct() constructor private.

@samdark samdark added type:enhancement Enhancement status:ready for adoption Feel free to implement this issue. labels Oct 25, 2018
@SamMousa
Copy link
Contributor Author

SamMousa commented Nov 2, 2018

Implemented by #57

@SamMousa SamMousa closed this as completed Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for adoption Feel free to implement this issue. type:enhancement Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants