Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Sylius\Bundle\SettingsBundle\Doctrine\EventListener;

use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Event\OnFlushEventArgs;
use Doctrine\Persistence\Event\LifecycleEventArgs;
use Sylius\Bundle\SettingsBundle\Model\SettingsInterface;
use Sylius\Bundle\SettingsBundle\Schema\SchemaInterface;
use Sylius\Bundle\SettingsBundle\Schema\SettingsBuilder;
Expand Down Expand Up @@ -52,7 +52,7 @@ public function postLoad(LifecycleEventArgs $event)

public function onFlush(OnFlushEventArgs $event)
{
$entityManager = $event->getEntityManager();
$entityManager = $event->getObjectManager();
$unitOfWork = $entityManager->getUnitOfWork();

foreach ($unitOfWork->getScheduledEntityInsertions() as $entity) {
Expand All @@ -79,7 +79,7 @@ public function postFlush()
$this->parametersMap = [];
}

private function transform(SettingsInterface $settings, EntityManager $entityManager)
private function transform(SettingsInterface $settings, EntityManagerInterface $entityManager)
{
// store old parameters, so we can revert to it after flush
$this->parametersMap[] = [
Expand Down
Loading