src/Factory/EntityAttacherFactory.php
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $entityManager = $serviceLocator->get('doctrine.entitymanager.orm_default');

        return new EntityAttacher(
            $entityManager,
            $serviceLocator->get('Config')['mpacustomdoctrinehydrator']['formats'][Locale::getDefault()],
            new DoctrineObject($entityManager)
        );
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $entityManager = $serviceLocator->get('doctrine.entitymanager.orm_default');

        return new EntityAttacher(
            $entityManager,
            $serviceLocator->get('Config')['mpacustomdoctrinehydrator']['formats'][Locale::getDefault()],
            new DoctrineObject($entityManager)
        );
    }
Create service

@param  ServiceLocatorInterface $serviceLocator
@return EntityAttacher