diff --git a/composer.json b/composer.json index 998cd0a7f..25b464066 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "nette/tester": "^2.0", - "nette/di": "^v3.0.0-beta2", + "nette/di": "^v3.0", "mockery/mockery": "^1.0.0", "tracy/tracy": "^2.4" }, diff --git a/src/Bridges/DatabaseDI/DatabaseExtension.php b/src/Bridges/DatabaseDI/DatabaseExtension.php index 5b9edc175..84d733db8 100644 --- a/src/Bridges/DatabaseDI/DatabaseExtension.php +++ b/src/Bridges/DatabaseDI/DatabaseExtension.php @@ -78,8 +78,7 @@ private function setupDatabase(array $config, string $name): void $connection = $builder->addDefinition($this->prefix("$name.connection")) ->setFactory(Nette\Database\Connection::class, [$config['dsn'], $config['user'], $config['password'], $config['options']]) - ->setAutowired($config['autowired']) - ->setExported(); + ->setAutowired($config['autowired']); $structure = $builder->addDefinition($this->prefix("$name.structure")) ->setFactory(Nette\Database\Structure::class) @@ -108,13 +107,12 @@ private function setupDatabase(array $config, string $name): void ->setAutowired($config['autowired']); } else { - $conventions = Nette\DI\Config\Processor::filterArguments([$config['conventions']])[0]; + $conventions = Nette\DI\Config\Processor::processArguments([$config['conventions']])[0]; } $builder->addDefinition($this->prefix("$name.context")) ->setFactory(Nette\Database\Context::class, [$connection, $structure, $conventions]) - ->setAutowired($config['autowired']) - ->setExported(); + ->setAutowired($config['autowired']); if ($config['debugger']) { $connection->addSetup('@Tracy\BlueScreen::addPanel', [