Skip to content
Permalink
Browse files

ApplicationExtension: options scanDirs has higher priority than robot…

  • Loading branch information
dg committed Nov 23, 2019
1 parent e65cf05 commit a7f56832b6773f49858ef0543aff00bc3d073dcc
Showing with 5 additions and 8 deletions.
  1. +5 −8 src/Bridges/ApplicationDI/ApplicationExtension.php
@@ -138,14 +138,7 @@ private function findPresenters(): array
{
$config = $this->getConfig();
if ($this->robotLoader) {
if ($config->scanDirs && $config->scanDirs !== $this->scanDirs) {
trigger_error("Option 'scanDir' has no effect, global RobotLoader is used.", E_USER_DEPRECATED);
}
$robot = $this->robotLoader;
$robot->refresh();
} elseif ($config->scanDirs) {
if ($config->scanDirs) {
if (!class_exists(Nette\Loaders\RobotLoader::class)) {
throw new Nette\NotSupportedException("RobotLoader is required to find presenters, install package `nette/robot-loader` or disable option {$this->prefix('scanDirs')}: false");
}
@@ -158,6 +151,10 @@ private function findPresenters(): array
} else {
$robot->rebuild();
}
} elseif ($this->robotLoader && $config->scanDirs !== false) {
$robot = $this->robotLoader;
$robot->refresh();
}
$classes = [];

0 comments on commit a7f5683

Please sign in to comment.
You can’t perform that action at this time.