Answer the question
In order to leave comments, you need to log in
How to initialize symfony dependency injection without using symfony?
I use symfony components in development.
I want to be able to call components like in symfony ($this->container->get('router'))
We need router, doctrine, session and so on.
Thank you.
Answer the question
In order to leave comments, you need to log in
It seems you have an error here:
$container
->register('doctrine.setup')
->addArgument(array(
array(APP_DIR."/Model"),
APP_DEV,
null,
null,
false
))
->setFactory(array(Doctrine\ORM\Tools\Setup::class, 'createAnnotationMetadataConfiguration'));
->addArgument()
. See here . You need to pass each argument in separate calls. That is, instead of: Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question