diff --git a/composer.json b/composer.json index 5412605..98e3251 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "friendsofphp/php-cs-fixer": "^3.17", "kubawerlos/php-cs-fixer-custom-fixers": "^3.14", "mockery/mockery": "^1.6", - "nette/bootstrap": "^3.0", + "nette/bootstrap": "^3.1", "nette/caching": "^3.1", "nette/di": "^3.0", "nette/tester": "^2.4", diff --git a/src/Bridge/Nette/DI/AmpClientExtension.php b/src/Bridge/Nette/DI/AmpClientExtension.php index a0fb517..be5be3d 100644 --- a/src/Bridge/Nette/DI/AmpClientExtension.php +++ b/src/Bridge/Nette/DI/AmpClientExtension.php @@ -79,7 +79,7 @@ public function loadConfiguration(): void $builder->addDefinition($this->prefix('config')) ->setAutowired(false) ->setType(ClientConfig::class) - ->setCreator($this->createClientConfigCreator($config)); + ->setFactory($this->createClientConfigCreator($config)); $cacheStorageCreator = null === $config->cache->storage ? new Statement(NoCacheStorage::class) @@ -90,29 +90,29 @@ public function loadConfiguration(): void $builder->addDefinition($this->prefix('cacheStorage')) ->setAutowired(false) ->setType(CacheStorageInterface::class) - ->setCreator($cacheStorageCreator); + ->setFactory($cacheStorageCreator); $builder->addDefinition($this->prefix('responseHydrator')) ->setAutowired(false) ->setType(ResponseHydratorInterface::class) - ->setCreator(ResponseHydrator::class); + ->setFactory(ResponseHydrator::class); $builder->addDefinition($this->prefix('responseHydrator.handler.bannersRequest')) ->setAutowired(false) ->setType(ResponseHydratorHandlerInterface::class) - ->setCreator(BannersResponseHydratorHandler::class); + ->setFactory(BannersResponseHydratorHandler::class); $builder->addDefinition($this->prefix('httpClientFactory')) ->setAutowired(false) ->setType(HttpClientFactoryInterface::class) - ->setCreator(HttpClientFactory::class, [ + ->setFactory(HttpClientFactory::class, [ 'responseHydrator' => $this->prefix('@responseHydrator'), 'guzzleClientConfig' => $config->http->guzzle_config, ]); $builder->addDefinition($this->prefix('ampClient')) ->setType(AmpClientInterface::class) - ->setCreator(AmpClient::class, [ + ->setFactory(AmpClient::class, [ 'config' => $this->prefix('@config'), 'httpClientFactory' => $this->prefix('@httpClientFactory'), 'cacheStorage' => $this->prefix('@cacheStorage'),