laravel/framework — pull request #3646 by karptonite (2014-02-22 06:20:24+00:00)
Title: pass partial params when resolving dependencies through container

If all of a classes dependencies can be deduced from the constructor via reflection, you can resolve the class through the container without ever binding a closure. But sometimes you have a constructor with parameters that might look like this:
```
__construct(Foo\Bar $foobar, $firstname, $lastname, Foo\Bat $foobat)
```
(more parameters than would be wise, for the sake of the example)
To resolve this dependency and pass the names in via the container, you'd have to define a closure, and you'd have to specify Foo\Bar and Foo\Bat in the closure--you can't just rely on the Container's use of reflection (as far as I can tell, anyway).

This patch enhances Container to allow some dependencies to be passed into ```$container->make()```, while others are resolved by reflection.

To make an object from a class 'Baz' with the constructor above, while passing the values in, you would use the following syntax:
```
$container->make('Baz', array(1=>'Daniel', 2=>'Karp');
```
(the keys are 1 and 2 because those are the positions of the firstname and lastname parameters, starting counting from 0.)
Container will now respect the keys in the parameters array, and resolve the parameters in positions not passed in the parameters array by reflection.

I'm believe this is a non-breaking change--it certainly passes all of the tests. But if there is interest in the feature, but concern about whether it would break anything, I can resubmit it to the master branch instead.