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

Inform the application container about deferred providers before registering providers #38724

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/Illuminate/Foundation/ProviderRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,17 @@ public function load(array $providers)
$this->registerLoadEvents($provider, $events);
}

// We will add the deferred services to the application so that they are able
// to be resolved if necessary during the registration process of the eagerly
// loaded providers.
$this->app->addDeferredServices($manifest['deferred']);

// We will go ahead and register all of the eagerly loaded providers with the
// application so their services can be registered with the application as
// a provided service. Then we will set the deferred service list on it.
// a provided service.
foreach ($manifest['eager'] as $provider) {
$this->app->register($provider);
}

$this->app->addDeferredServices($manifest['deferred']);
}

/**
Expand Down