/**
* @param string $host The server host
* @param ContextProviderInterface[] $contextProviders Context providers indexed by context name
*/
public function __construct(string $host, array $contextProviders = [])
{
if (!str_contains($host, '://')) {
$host = 'tcp://'.$host;
}
$this->app->when(DumpServer::class)->needs('$host')->give($host);
$connection = new Connection($host, [
'request' => new RequestContextProvider($this->app['request']),
'source' => new SourceContextProvider('utf-8', base_path()),
]);
VarDumper::setHandler(function ($var) use ($connection) {
$this->app->makeWith(Dumper::class, ['connection' => $connection])->dump($var);
});
// a more convenient way of specifying your service provider classes.
if (is_string($provider)) {
$provider = $this->resolveProvider($provider);
}
$provider->register();
// If there are bindings / singletons set as properties on the provider we
// will spin through them and register them with the application, which
// serves as a convenience layer while registering a lot of bindings.
if (property_exists($provider, 'bindings')) {
// 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.
foreach ($manifest['eager'] as $provider) {
$this->app->register($provider);
}
$this->app->addDeferredServices($manifest['deferred']);
}
->partition(fn ($provider) => str_starts_with($provider, 'Illuminate\\'));
$providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);
(new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))
->load($providers->collapse()->toArray());
}
/**
* Register a service provider with the application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->registerConfiguredProviders();
}
}
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
$this->requestStartedAt = Carbon::now();
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
TypeError
|
---|
TypeError: Symfony\Component\VarDumper\Server\Connection::__construct(): Argument #1 ($host) must be of type string, null given, called in /home/lang50/public_html/vendor/beyondcode/laravel-dump-server/src/DumpServerServiceProvider.php on line 49 at /home/lang50/public_html/vendor/symfony/var-dumper/Server/Connection.php:36 at Symfony\Component\VarDumper\Server\Connection->__construct() (/home/lang50/public_html/vendor/beyondcode/laravel-dump-server/src/DumpServerServiceProvider.php:49) at BeyondCode\DumpServer\DumpServerServiceProvider->register() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:687) at Illuminate\Foundation\Application->register() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75) at Illuminate\Foundation\ProviderRepository->load() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:664) at Illuminate\Foundation\Application->registerConfiguredProviders() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17) at Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:242) at Illuminate\Foundation\Application->bootstrapWith() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176) at Illuminate\Foundation\Http\Kernel->bootstrap() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:160) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/home/lang50/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:134) at Illuminate\Foundation\Http\Kernel->handle() (/home/lang50/public_html/public/index.php:61) |