diff --git a/app/src/Controller/Controller.php b/app/src/Controller/Controller.php index 63b102f..9db6937 100644 --- a/app/src/Controller/Controller.php +++ b/app/src/Controller/Controller.php @@ -32,7 +32,7 @@ abstract class Controller $this->response = $response; $this->args = $args; $this->routeContext = RouteContext::fromRequest($this->request); - $this->view = Twig::fromRequest($request); + $this->view = $this->request->getAttribute('view'); return $this->handle(); } diff --git a/app/src/Infrastructure/Api/Database/DatabaseHandlerInterface.php b/app/src/Infrastructure/Api/Database/DatabaseHandlerInterface.php index f0a9c82..99afc82 100644 --- a/app/src/Infrastructure/Api/Database/DatabaseHandlerInterface.php +++ b/app/src/Infrastructure/Api/Database/DatabaseHandlerInterface.php @@ -2,11 +2,14 @@ namespace Slovocast\Infrastructure\Api\Database; +use ReturnTypeWillChange; + interface DatabaseHandlerInterface { /** * @return mixed The return must be an active connection to a database. */ + #[ReturnTypeWillChange] public function getConnection(); /** diff --git a/app/src/Infrastructure/Database/DatabaseHandler.php b/app/src/Infrastructure/Database/DatabaseHandler.php index 84519e8..c96feda 100644 --- a/app/src/Infrastructure/Database/DatabaseHandler.php +++ b/app/src/Infrastructure/Database/DatabaseHandler.php @@ -33,7 +33,7 @@ class DatabaseHandler implements DatabaseHandlerInterface /** * @return PDO For this particular Handler we will return the PDO object */ - public function getConnection() + public function getConnection(): PDO { return $this->handle; } diff --git a/app/src/Middlewares.php b/app/src/Middlewares.php index b52d30e..067079f 100644 --- a/app/src/Middlewares.php +++ b/app/src/Middlewares.php @@ -3,7 +3,6 @@ namespace Slovocast; use League\Config\Configuration; -use Odan\Session\Middleware\SessionStartMiddleware; use Odan\Session\SessionInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface;