Closed pmjones closed 10 years ago
Ping @hidenorigoto @madapaja @djmattyg007 @tailwindsllc @szkshi @atakig @suzuyan @exsuzukishuhei @mnapoli @pies @bytephp @timw4mail @mosiyash @jleider @nubs @harikt @phpingguo @koriym @jblotus @isimmons @happyaccidents @yagmikita @jeremeamia @mihaeu @atelierdisko @kumamidori @Flugund @williamsodell @njasm @rjmackay @ushahidi
Also ping @mbrevda and @adriengibrat who have explicitly asked for this.
See also mailing list discussion at https://groups.google.com/forum/#!topic/auraphp/aeaEV-5Q76A
Thanks for remembering! Let me see if I can fit this in to the workflow somewhere...
I would like to ping @TomBZombie for he is doing bench marking of di containers .
I'll be happy to update my benchmark : https://github.com/adriengibrat/benchmarking-dependency-injection-containers 6 month ago the results was: http://adriengibrat.github.io/benchmarking-dependency-injection-containers/
I haven't yet had a chance to read over the patch (in fact, I haven't been keeping up with it for a few months now, so I've got a bit of catchup work to do), but from the description and the mailing list discussion, I like it quite a bit.
I do have one question: how is the callable type hint supported? "Not at all" is a perfectly good answer, I just wanted to make sure it'd been thought of and won't crash the code.
@djmattyg007 As far as "callable" there's no way I can think of to auto-resolve it. There's no class associated with it, so we can't instantiate anything; and unlike "array" there's no one canonical callable representation. So I don't see that it can be supported by auto-resolution. In short, "not at all" AFAICT. ;-)
I am good with this. May be we press the green button :+1: .
Green button it is.
:+1:
Were the docs updated?
On Tue, Sep 2, 2014 at 8:59 PM, Luis Cordova notifications@github.com wrote:
[image: :+1:]
— Reply to this email directly or view it on GitHub https://github.com/auraphp/Aura.Di/pull/58#issuecomment-54191911.
No, that's the very next task. I think a full README rewrite is in order at this point.
FWIW all the pre-existing idioms work unchanged.
I didnt say "requires" :). And yes, the current readme is a bit of a ramble...
On Tue, Sep 2, 2014 at 9:03 PM, Paul M. Jones notifications@github.com wrote:
FWIW all the pre-existing idioms work unchanged.
— Reply to this email directly or view it on GitHub https://github.com/auraphp/Aura.Di/pull/58#issuecomment-54192476.
Benchmark updated: http://adriengibrat.github.io/benchmarking-dependency-injection-containers/
That's very heartening. :-)
:+1:
This allows type hinted constructor params, that do not have explicit DI values, to receive new instances of their type hinted classes. It also allows explicit auto-resolution of type hints to a specific class or service. Incidentally, params type hinted to
array
will receive empty arrays when no explicit value is passed.