From 63b0ed69997682d8a704f021e114ca417af0ff22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Wed, 22 Apr 2020 11:34:49 +0200 Subject: [PATCH] Extension: Automatic registration of static connection for back compatibility. --- src/Dibi/Bridges/Nette/DibiExtension22.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Dibi/Bridges/Nette/DibiExtension22.php b/src/Dibi/Bridges/Nette/DibiExtension22.php index c317d1bde..460392899 100644 --- a/src/Dibi/Bridges/Nette/DibiExtension22.php +++ b/src/Dibi/Bridges/Nette/DibiExtension22.php @@ -68,5 +68,8 @@ public function loadConfiguration() ]); $connection->addSetup([$panel, 'register'], [$connection]); } + if ($config['staticConnection'] ?? false) { + $connection->addSetup(new Nette\DI\Statement('\dibi::setConnection')); + } } }