diff --git a/src/config/src/ConfigProvider.php b/src/config/src/ConfigProvider.php index 484765b0a..949ab64af 100644 --- a/src/config/src/ConfigProvider.php +++ b/src/config/src/ConfigProvider.php @@ -5,7 +5,6 @@ namespace Hypervel\Config; use Hyperf\Contract\ConfigInterface; -use Hypervel\Config\Contracts\Repository as ConfigContract; class ConfigProvider { @@ -13,7 +12,6 @@ public function __invoke(): array { return [ 'dependencies' => [ - ConfigContract::class => ConfigFactory::class, ConfigInterface::class => ConfigFactory::class, ], ]; diff --git a/src/config/src/Functions.php b/src/config/src/Functions.php index e344acc1c..9fe456f69 100644 --- a/src/config/src/Functions.php +++ b/src/config/src/Functions.php @@ -5,7 +5,7 @@ namespace Hypervel\Config; use Hyperf\Context\ApplicationContext; -use Hyperf\Contract\ConfigInterface; +use Hypervel\Config\Contracts\Repository as ConfigContract; /** * Get / set the specified configuration value. @@ -17,7 +17,7 @@ */ function config(mixed $key = null, mixed $default = null): mixed { - $config = ApplicationContext::getContainer()->get(ConfigInterface::class); + $config = ApplicationContext::getContainer()->get(ConfigContract::class); if (is_null($key)) { return $config; diff --git a/src/foundation/src/Application.php b/src/foundation/src/Application.php index 34215f61a..68bec4fdd 100644 --- a/src/foundation/src/Application.php +++ b/src/foundation/src/Application.php @@ -524,7 +524,10 @@ protected function registerCoreContainerAliases(): void \Hypervel\Foundation\Application::class, ], \Hypervel\Foundation\Console\Contracts\Kernel::class => ['artisan'], - \Hyperf\Contract\ConfigInterface::class => ['config'], + \Hyperf\Contract\ConfigInterface::class => [ + 'config', + \Hypervel\Config\Contracts\Repository::class, + ], \Psr\EventDispatcher\EventDispatcherInterface::class => [ 'events', \Hypervel\Event\Contracts\EventDispatcherContract::class, @@ -554,6 +557,7 @@ protected function registerCoreContainerAliases(): void 'request', \Hyperf\HttpServer\Contract\RequestInterface::class, \Hyperf\HttpServer\Request::class, + \Hypervel\Http\Contracts\RequestContract::class, ], \Hyperf\HttpServer\Contract\ResponseInterface::class => [ 'response', diff --git a/src/http/src/ConfigProvider.php b/src/http/src/ConfigProvider.php index 86a6dd411..da697987f 100644 --- a/src/http/src/ConfigProvider.php +++ b/src/http/src/ConfigProvider.php @@ -5,7 +5,6 @@ namespace Hypervel\Http; use Hyperf\HttpServer\CoreMiddleware as HyperfCoreMiddleware; -use Hypervel\Http\Contracts\RequestContract; use Hypervel\Http\Contracts\ResponseContract; use Psr\Http\Message\ServerRequestInterface; @@ -15,7 +14,6 @@ public function __invoke(): array { return [ 'dependencies' => [ - RequestContract::class => Request::class, ResponseContract::class => Response::class, ServerRequestInterface::class => Request::class, HyperfCoreMiddleware::class => CoreMiddleware::class,