Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed May 31, 2023
1 parent eb0be48 commit 3159ad1
Show file tree
Hide file tree
Showing 24 changed files with 90 additions and 364 deletions.
4 changes: 4 additions & 0 deletions centrifugo/.rr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ centrifuge:

metrics:
address: 0.0.0.0:2112

status:
address: 127.0.0.1:2114
unavailable_status_code: 503
1 change: 0 additions & 1 deletion centrifugo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// Initialize shared container, bindings, directories and etc.
$app = App::create(
directories: ['root' => __DIR__],
exceptionHandler: \App\Exception\Handler::class
)->run();

if ($app === null) {
Expand Down
15 changes: 0 additions & 15 deletions centrifugo/app/src/Bootloader/ExceptionHandlerBootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,19 @@

namespace App\Bootloader;

use App\ErrorHandler\ViewRenderer;
use App\Exception\CollisionRenderer;
use Spiral\Boot\AbstractKernel;
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Exceptions\ExceptionHandler;
use Spiral\Exceptions\ExceptionHandlerInterface;
use Spiral\Exceptions\Renderer\JsonRenderer;
use Spiral\Exceptions\Reporter\FileReporter;
use Spiral\Exceptions\Reporter\LoggerReporter;
use Spiral\Http\ErrorHandler\RendererInterface;
use Spiral\Http\Middleware\ErrorHandlerMiddleware\EnvSuppressErrors;
use Spiral\Http\Middleware\ErrorHandlerMiddleware\SuppressErrorsInterface;
use Spiral\Ignition\IgnitionRenderer;

final class ExceptionHandlerBootloader extends Bootloader
{
protected const BINDINGS = [
SuppressErrorsInterface::class => EnvSuppressErrors::class,
];

public function init(AbstractKernel $kernel): void
{
$kernel->running(static function (ExceptionHandler $handler): void {
// $handler->addRenderer(new ConsoleRenderer());
$handler->addRenderer(new CollisionRenderer());
});
}

public function boot(
ExceptionHandlerInterface $handler,
LoggerReporter $logger,
Expand Down
52 changes: 0 additions & 52 deletions centrifugo/app/src/Exception/CollisionRenderer.php

This file was deleted.

16 changes: 0 additions & 16 deletions centrifugo/app/src/Exception/Handler.php

This file was deleted.

3 changes: 3 additions & 0 deletions cinema/.rr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ metrics:
type: counter
help: "Canceled reservations"

status:
address: 127.0.0.1:2114
unavailable_status_code: 503
1 change: 0 additions & 1 deletion cinema/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// Initialize shared container, bindings, directories and etc.
$app = App::create(
directories: ['root' => __DIR__],
exceptionHandler: \App\Exception\Handler::class
)->run();

if ($app === null) {
Expand Down
15 changes: 0 additions & 15 deletions cinema/app/src/Bootloader/ExceptionHandlerBootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,19 @@

namespace App\Bootloader;

use App\ErrorHandler\ViewRenderer;
use App\Exception\CollisionRenderer;
use Spiral\Boot\AbstractKernel;
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Exceptions\ExceptionHandler;
use Spiral\Exceptions\ExceptionHandlerInterface;
use Spiral\Exceptions\Renderer\JsonRenderer;
use Spiral\Exceptions\Reporter\FileReporter;
use Spiral\Exceptions\Reporter\LoggerReporter;
use Spiral\Http\ErrorHandler\RendererInterface;
use Spiral\Http\Middleware\ErrorHandlerMiddleware\EnvSuppressErrors;
use Spiral\Http\Middleware\ErrorHandlerMiddleware\SuppressErrorsInterface;
use Spiral\Ignition\IgnitionRenderer;

final class ExceptionHandlerBootloader extends Bootloader
{
protected const BINDINGS = [
SuppressErrorsInterface::class => EnvSuppressErrors::class,
];

public function init(AbstractKernel $kernel): void
{
$kernel->running(static function (ExceptionHandler $handler): void {
// $handler->addRenderer(new ConsoleRenderer());
$handler->addRenderer(new CollisionRenderer());
});
}

public function boot(
ExceptionHandlerInterface $handler,
LoggerReporter $logger,
Expand Down
52 changes: 0 additions & 52 deletions cinema/app/src/Exception/CollisionRenderer.php

This file was deleted.

16 changes: 0 additions & 16 deletions cinema/app/src/Exception/Handler.php

This file was deleted.

Loading

0 comments on commit 3159ad1

Please sign in to comment.