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
The ContentPublishTaskHandler and the ContentUnpublishTaskHandler get the entityRepository via the entityManager with $repository = $this->entityManager->getRepository($class);.
In the doctrine/DotrineBundle the method ContainerRepositoryFactory::getOrCreateRepository(..), which is used by the EntityManager::getRepository(..) method, is type hinted for versions newer than 2.0.6 with the return type ObjectRepository.
Thus means, for the ContentTaskHandler to work properly, the entityRepository must implement the ObjectRepository interface.
Possible solution:
Instead of getting the repository via the entityManager, just use entityManager->find($class, $id).
The text was updated successfully, but these errors were encountered:
Want to mention that ContentReindexProvider/ContentTeaserProvider/ContentObjectProvider are currently violeting the #196.
There already exist the DimensionRepository which should be used for all admin processes. The DimensionRepositoryInterface should be adjusted to get just the class and the id of the element (more is currently not needed):
Problem:
The
ContentPublishTaskHandler
and theContentUnpublishTaskHandler
get the entityRepository via theentityManager
with$repository = $this->entityManager->getRepository($class);
.In the
doctrine/DotrineBundle
the method ContainerRepositoryFactory::getOrCreateRepository(..), which is used by theEntityManager::getRepository(..)
method, is type hinted for versions newer than 2.0.6 with the return typeObjectRepository
.Thus means, for the
ContentTaskHandler
to work properly, the entityRepository must implement theObjectRepository
interface.Possible solution:
Instead of getting the repository via the
entityManager
, just useentityManager->find($class, $id)
.The text was updated successfully, but these errors were encountered: