Category: entitymanager

Select an entity manager with Dependency Injection in Symfony

I have defined two different entity managers in doctrine.yaml entity_managers: EM1: naming_strategy: doctrine.orm.naming_strategy.underscore mappings: AppEM1: is_bundle: false type: annotation dir: ‘%kernel.project_dir%/src/BC1/Domain/Entity’ prefix: ‘BC1DomainEntity’ alias: AppEM1 EM2: naming_strategy: doctrine.orm.naming_strategy.underscore mappings: AppEM2: is_bundle: false type: annotation dir: ‘%kernel.project_dir%/src/BC2/Domain/Entity’ prefix: ‘BC2DomainEntity’ alias: AppEM2…

Calling Doctrine clear() with an argument is deprecated

Doctrine advises that – Calling DoctrineORMEntityManager::clear() with any arguments to clear specific entities is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. We have a lot of references to ->clear(SpecificEntity::class) in our Symfony codebase and are looking to…

KayueWordPressBundle with SYmfony 4.4.1: The class XXX was not found in the chain configured namespaces AppEntity

I’m trying to work with kayue/KayueWordpressBundle installed with composer as composer require kayue/kayue-wordpress-bundle in my Symfony 4.4.1 project but I’m unable to. This is what I’m trying to do: <?php namespace AppServiceWordPress; use DoctrineORMEntityManagerInterface; use KayueWordpressBundleEntityPost; class PostCollection { protected…