Skip to content

Commit

Permalink
fix c7a9e2b
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 1, 2024
1 parent 8645dcb commit 0ef8bc2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Bridges/DatabaseDI/DatabaseExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function getConfigSchema(): Nette\Schema\Schema
'options' => Expect::array(),
'debugger' => Expect::bool(),
'explain' => Expect::bool(true),
'reflection' => Expect::string(), // BC
'conventions' => Expect::string('discovered'), // Nette\Database\Conventions\DiscoveredConventions
'autowired' => Expect::bool(),
]),
Expand Down Expand Up @@ -77,6 +78,10 @@ public function beforeCompile(): void

private function setupDatabase(\stdClass $config, string $name): void
{
if (!empty($config->reflection)) {
throw new Nette\DeprecatedException('The "reflection" option is deprecated, use "conventions" instead.');
}

$builder = $this->getContainerBuilder();

foreach ($config->options as $key => $value) {
Expand Down

0 comments on commit 0ef8bc2

Please sign in to comment.