How to cut dependency between nette/bootstrap and robotLoader

Notice: This thread is very old.
Jan Endel
Member | 1016
+
0
-

Hi there, i have these composer.json:

"require": {
  "php": ">= 5.5.0",
  "nette/utils": "@dev",
  "tracy/tracy": "@dev",
  "nette/neon": "@dev",
  "nette/finder": "@dev",
  "nette/di": "@dev",
  "kdyby/console": "~2.3@dev",
  "nette/bootstrap": "@dev"
},

and i want to use classical bootstrap, but when I try launch console command i get Fatal error: Class 'Nette\Loaders\RobotLoader' not found in .. but i don`t want it in my project. Whole autoloading is composer thing. I made a little research and i found – bootstrap has this row in default configuration:

public $defaultExtensions = array(
		'application' => array('Nette\Bridges\ApplicationDI\ApplicationExtension', array('%debugMode%', array('%appDir%'))),

second param is scanDir for robot loader, so my question is – Is there any way to disable it, not by replacing application extension in config.neon like this?

extensions:
	application: MyApp\DI\MyAppExtension
enumag
Member | 2118
+
0
-
$configurator = new \Nette\Configurator();
$configurator->defaultExtensions = []; // or maybe add ExtensionsExtension
// ...
Jan Endel
Member | 1016
+
0
-

Aah its public property, never mind :-). Thanks.

Jan Tvrdík
Nette guru | 2595
+
0
-

Does the following work in config.neon?

application:
	scanDir: []
David Grudl
Nette Core | 8227
+
0
-

It should be scanDir!: []