Skip to content

Commit

Permalink
remove debugging -> migrate to core
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Oct 15, 2023
1 parent c70f252 commit a02b487
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 230 deletions.
226 changes: 0 additions & 226 deletions SubModules/ServiceInitializer/Middlewares/DebuggingMiddleware.php

This file was deleted.

10 changes: 6 additions & 4 deletions SubModules/ServiceInitializer/ServiceInitializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use ArrayAccess\TrayDigita\App\Modules\Core\Abstracts\CoreSubmoduleAbstract;
use ArrayAccess\TrayDigita\App\Modules\Core\Entities\CacheItem;
use ArrayAccess\TrayDigita\App\Modules\Core\Entities\LogItem;
use ArrayAccess\TrayDigita\App\Modules\Core\SubModules\ServiceInitializer\Middlewares\DebuggingMiddleware;
use ArrayAccess\TrayDigita\App\Modules\Core\SubModules\ServiceInitializer\Middlewares\ErrorMiddleware;
use ArrayAccess\TrayDigita\App\Modules\Core\SubModules\ServiceInitializer\Middlewares\InitMiddleware;
use ArrayAccess\TrayDigita\Collection\Config;
Expand All @@ -16,6 +15,7 @@
use ArrayAccess\TrayDigita\Util\Filter\Consolidation;
use ArrayAccess\TrayDigita\Util\Filter\ContainerHelper;
use Psr\Http\Server\MiddlewareInterface;
use Throwable;
use function is_array;
use function is_string;

Expand All @@ -29,7 +29,6 @@ final class ServiceInitializer extends CoreSubmoduleAbstract
* @var array<class-string<MiddlewareInterface>>
*/
protected array $middlewares = [
DebuggingMiddleware::class,
ErrorMiddleware::class,
InitMiddleware::class
];
Expand Down Expand Up @@ -104,8 +103,11 @@ private function doRegisterMiddlewares(): void
return;
}
foreach ($this->middlewares as $middleware) {
$middleware = ContainerHelper::resolveCallable($middleware, $this->getContainer());
$kernel->addMiddleware($middleware);
try {
$middleware = ContainerHelper::resolveCallable($middleware, $this->getContainer());
$kernel->addMiddleware($middleware);
} catch (Throwable) {
}
}
}

Expand Down

0 comments on commit a02b487

Please sign in to comment.