diff --git a/src/Bootstrap.php b/src/Bootstrap.php index ca8720f..2c276d6 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -7,7 +7,6 @@ use Lubian\AttributeMagic\Infrastructure\Event\Dispatcher; use Lubian\AttributeMagic\Infrastructure\Event\DispatcherFactory; use Lubian\AttributeMagic\Infrastructure\Finder; use Lubian\AttributeMagic\Infrastructure\HttpKernel; -use Lubian\AttributeMagic\Infrastructure\WebApp\Request\RequestEvent; use Lubian\AttributeMagic\Infrastructure\WebApp\Route\HandlerResolver; use Symfony\Component\HttpFoundation\Request; @@ -26,9 +25,6 @@ $container = (new ContainerBuilder)->addDefinitions( )->build(); $kernel = $container->get(HttpKernel::class); assert($kernel instanceof HttpKernel); - $response = $kernel->handle(Request::createFromGlobals()); - $response->send(); - exit(); diff --git a/src/Infrastructure/HttpKernel.php b/src/Infrastructure/HttpKernel.php index d3e6ec0..6cce606 100644 --- a/src/Infrastructure/HttpKernel.php +++ b/src/Infrastructure/HttpKernel.php @@ -1,7 +1,8 @@ -dispatcher->dispatch($requestEvent); - - return $requestEvent->response ?? throw new \Exception('errror'); + return $requestEvent->response ?? throw new Exception('errror'); } -} \ No newline at end of file +}