From 4c087a156b84f8d729b1d85c327d8f1d88316600 Mon Sep 17 00:00:00 2001 From: User Date: Tue, 26 Sep 2023 16:49:41 +0300 Subject: [PATCH] 20230926#1 --- composer.json | 3 ++- config/container/services.php | 2 -- src/Common/Controllers/AbstractController.php | 16 ---------------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 8200c11..e6b679d 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "monolog/monolog": "^2.3", "php-di/php-di": "^6.3", "symfony/dotenv": "^6.2", - "rmphp/kernel": "^1.0", + "rmphp/kernel": "^2.0", "rmphp/router": "^1.0", "rmphp/content": "^1.0", "rmphp/storage": "^1.0" @@ -30,6 +30,7 @@ "process-timeout":0 }, "require-dev": { + "symfony/var-dumper": "^5.3", "rmphp/var-damper": "^1.0" } } diff --git a/config/container/services.php b/config/container/services.php index 475521e..31a1c27 100644 --- a/config/container/services.php +++ b/config/container/services.php @@ -6,6 +6,4 @@ use Rmphp\Storage\MysqlStorageInterface; return [ MysqlStorageInterface::class => DI\create(MysqlStorage::class)->constructor(json_decode(getenv("MYSQL_PARAM"), true)), 'App\*\Domain\Repository\*RepositoryInterface' => DI\autowire('App\*\Repository\Mysql\*Repository'), - 'App\*\Services\*\*Service' => DI\autowire('App\*\Services\*\*Service'), - 'App\*\Services\*Service' => DI\autowire('App\*\Services\*Service'), ]; \ No newline at end of file diff --git a/src/Common/Controllers/AbstractController.php b/src/Common/Controllers/AbstractController.php index a2d4525..1882d3e 100644 --- a/src/Common/Controllers/AbstractController.php +++ b/src/Common/Controllers/AbstractController.php @@ -13,22 +13,6 @@ use Rmphp\Kernel\Main; abstract class AbstractController extends Main { - /** - * @param string $name - * @return mixed|void - */ - public function containerGet(string $name) { - try { - return $this->container()->get($name); - } - catch (NotFoundExceptionInterface $notFoundException){ - $this->syslogger()->error($notFoundException->getMessage()); - } - catch (ContainerExceptionInterface $containerException){ - $this->syslogger()->error($containerException->getMessage()); - } - } - /** * @param \Throwable $throwable * @param array $data