You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have interesting use-case. I have a command, which I want to execute from other command -- because one is maintenance and one is a one-time migration, which is quite extensive (essentially, we're upgrading systems.)
[2016-02-08 19-50-14] Nette\DI\ServiceCreationException:
Service 'console.command.0':
Service of type App\Commands\Maintenance\Focus\Paths needed by App\Commands\MigrationScripts\Y2016Q1\CleanupFocus::__construct() not found.
Did you register it in configuration file?
Stack trace:
#0 C:\Users\pptacek\www\projectname,ha!\vendor\nette\di\src\DI\Compiler.php(213): Nette\DI\ContainerBuilder->generateClasses(NULL, NULL)
#1 C:\Users\pptacek\www\projectname,ha!\vendor\nette\di\src\DI\Compiler.php(139): Nette\DI\Compiler->generateCode(NULL, NULL)
#2 C:\Users\pptacek\www\projectname,ha!\vendor\nette\bootstrap\src\Bootstrap\Configurator.php(264): Nette\DI\Compiler->compile()
#3 [internal function]: Nette\Configurator->generateContainer(Object(Nette\DI\Compiler))
#4 C:\Users\pptacek\www\projectname,ha!\vendor\nette\di\src\DI\ContainerLoader.php(111): call_user_func_array(Array, Array)
#5 C:\Users\pptacek\www\projectname,ha!\vendor\nette\di\src\DI\ContainerLoader.php(76): Nette\DI\ContainerLoader->generate('Container_168f2...', Array)
#6 C:\Users\pptacek\www\projectname,ha!\vendor\nette\di\src\DI\ContainerLoader.php(41): Nette\DI\ContainerLoader->loadFile('Container_168f2...', Array)
#7 C:\Users\pptacek\www\projectname,ha!\vendor\nette\bootstrap\src\Bootstrap\Configurator.php(218): Nette\DI\ContainerLoader->load(Array, Array)
#8 C:\Users\pptacek\www\projectname,ha!\app\bootstrap.php(23): Nette\Configurator->createContainer()
#9 C:\Users\pptacek\www\projectname,ha!\www\index.php(6): require('C:\\Users\\pptace...')
#10 {main}
(stored in C:\Users\pptacek\www\projectname,ha!\app\..\log\exception--2016-02-08--19-50--1b383ca34c.html)�
If you'd point me to the proper point where I can fix this one, I'd apprecieate it. Cannot continue on it today, but will jump on it first thing tomorrow morning (basically - I need it working :)) )
Creating an issue, since in services section of Nette DI, you can reference other services from constructors -- so this is solvable, somehow.
I know, hotfix might be using @inject - didn't test.
The text was updated successfully, but these errors were encountered:
So I have interesting use-case. I have a command, which I want to execute from other command -- because one is maintenance and one is a one-time migration, which is quite extensive (essentially, we're upgrading systems.)
Soooo, I've did this:
Constructor looks like this:
BUT the DI builder throws a following exception:
If you'd point me to the proper point where I can fix this one, I'd apprecieate it. Cannot continue on it today, but will jump on it first thing tomorrow morning (basically - I need it working :)) )
Creating an issue, since in
services
section of Nette DI, you can reference other services from constructors -- so this is solvable, somehow.I know, hotfix might be using
@inject
- didn't test.The text was updated successfully, but these errors were encountered: