Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[5.4] Use Instance instead of Deferred Provider (#20714)
* Use Instance instead of Deferred Provider When calling app()->instance('foo','bar'), if there's a deferred service provider registered for class foo, the deferred provider gets called and overrides the instance that was just set. This means that if you have app()->bind('foo','foo); // in a deferred service provider and you run the following as the first reference to 'foo' app()->instance('foo','bar'); $instance = app()->make('foo'); $instance = 'foo' instead of 'bar' Added an additional condition to Application->make to check to see if an instance for that $abstract as already been set and skip loading the deferred provider if it does. * Fix style
- Loading branch information