diff --git a/src/Bridges/ApplicationDI/ApplicationExtension.php b/src/Bridges/ApplicationDI/ApplicationExtension.php index f03b91610..7ddae85a3 100644 --- a/src/Bridges/ApplicationDI/ApplicationExtension.php +++ b/src/Bridges/ApplicationDI/ApplicationExtension.php @@ -12,8 +12,8 @@ use Composer\Autoload\ClassLoader; use Nette; use Nette\Application\UI; -use Nette\DI\Config\Expect; use Nette\DI\Definitions; +use Nette\Schema\Expect; use Tracy; @@ -43,14 +43,14 @@ public function __construct(bool $debugMode = false, array $scanDirs = null, str } - public function getConfigSchema(): Nette\DI\Config\Schema + public function getConfigSchema(): Nette\Schema\Schema { return Expect::structure([ 'debugger' => Expect::bool(interface_exists(Tracy\IBarPanel::class)), 'errorPresenter' => Expect::string('Nette:Error')->dynamic(), 'catchExceptions' => Expect::bool(!$this->debugMode)->dynamic(), - 'mapping' => Expect::arrayOf('string')->dynamic(), - 'scanDirs' => Expect::enum(Expect::arrayOf('string')->default($this->scanDirs), false), + 'mapping' => Expect::arrayOf('string|array'), + 'scanDirs' => Expect::anyOf(Expect::arrayOf('string'), false)->default($this->scanDirs), 'scanComposer' => Expect::bool(class_exists(ClassLoader::class)), 'scanFilter' => Expect::string('Presenter'), 'silentLinks' => Expect::bool(),