Skip to content

Commit a7f5683

Browse files
committed
1 parent e65cf05 commit a7f5683

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,7 @@ private function findPresenters(): array
138138
{
139139
$config = $this->getConfig();
140140

141-
if ($this->robotLoader) {
142-
if ($config->scanDirs && $config->scanDirs !== $this->scanDirs) {
143-
trigger_error("Option 'scanDir' has no effect, global RobotLoader is used.", E_USER_DEPRECATED);
144-
}
145-
$robot = $this->robotLoader;
146-
$robot->refresh();
147-
148-
} elseif ($config->scanDirs) {
141+
if ($config->scanDirs) {
149142
if (!class_exists(Nette\Loaders\RobotLoader::class)) {
150143
throw new Nette\NotSupportedException("RobotLoader is required to find presenters, install package `nette/robot-loader` or disable option {$this->prefix('scanDirs')}: false");
151144
}
@@ -158,6 +151,10 @@ private function findPresenters(): array
158151
} else {
159152
$robot->rebuild();
160153
}
154+
155+
} elseif ($this->robotLoader && $config->scanDirs !== false) {
156+
$robot = $this->robotLoader;
157+
$robot->refresh();
161158
}
162159

163160
$classes = [];

0 commit comments

Comments
 (0)