Answer the question
In order to leave comments, you need to log in
Why can't he see the mapping?
Hello.
I connected the doctrine to the project (I use only some components from Symfony, in particular the DI container)
in `index.php`
$loader->load(dirname(__DIR__). '/config/services.yml');
doctrine.orm.config:
public: true
class: 'Doctrine\ORM\Configuration'
factory:
- 'Doctrine\ORM\Tools\Setup'
- 'createXMLMetadataConfiguration'
arguments:
- [ '../src/Infrastructure/Persistence/Doctrine/Mapping/' ]
- '%isDevMode%'
doctrine.orm.entity_manager:
public: true
autowire: true
class: 'Doctrine\ORM\EntityManager'
factory:
- 'Doctrine\ORM\EntityManager'
- 'create'
arguments:
- driver: 'pdo_mysql'
user: '%dbUser%'
password: '%dbPassword%'
dbname: '%dbName%'
- '@doctrine.orm.config'
protected function setUp(): void
{
require_once __DIR__ . '/../../../vendor/autoload.php';
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container, new FileLocator(__DIR__));
$loader->load(dirname(__DIR__). '/../../config/services.yml');
$container->compile();
$this->controller = $container->get('direction.web.controller');
}
No mapping file found named .... for class
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question