laravel/framework — pull request #3605 by anlutro (2014-02-19 11:07:16+00:00)
Title: Fix Container extend/instance problem

I ran into this problem when I was mocking a service in a unit test and then a deferred provider that called `Container::extend` on my service was invoked after the application was loaded.

Basically, if you do `Container::instance(..)` before the `Container::extend(...)` calls, the parameter passed to the `extend()` closure will contain the old instance - the one defined via `Container::bind`, not the one defined via `Container::instance`.