protected function handleProviders()
    {
        // register deferred providers
        foreach ($this->deferredProviders as $provider) {
            $this->app->registerDeferredProvider($provider);
        }

        if ($this->registerProvidersMethod === 'register') {
            $this->registerProviders();
        } elseif ($this->registerProvidersMethod === 'resolve') {
            $this->resolveProviders();
        } else {
            throw new \LogicException('registerProvidersMethod not valid');
        }
    }