diff --git a/UPGRADE-1.6.md b/UPGRADE-1.6.md index dd05f2d9a19..d66bdf59fee 100644 --- a/UPGRADE-1.6.md +++ b/UPGRADE-1.6.md @@ -36,3 +36,6 @@ UPGRADE FROM 1.5 to 1.6 ####OroUserBundle: - Added `oro_user_organization_acl_select` form type which selects users by assigned organizations, not by owned organization. - Added `oro_user_organization_acl_multiselect` multi select form type which selects users by assigned organizations, not by owned organization. + +####Composer dependencies: +- Removed abandoned package `guzzle/http` in favor of `guzzle/guzzle`. diff --git a/composer.json b/composer.json index 918d7352a34..fe9a1a543f3 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "a2lix/translation-form-bundle": "1.2", "mtdowling/cron-expression": "1.0.*", "jdare/clank-bundle": "0.1.*", - "guzzle/http": "3.7.*", + "guzzle/guzzle": "3.7.*", "lexik/maintenance-bundle": "v1.0.3", "sylius/flow-bundle": "0.6.*", "composer/composer": "1.0.0-alpha8", diff --git a/src/Oro/Bundle/SecurityBundle/EventListener/RefreshContextListener.php b/src/Oro/Bundle/SecurityBundle/EventListener/RefreshContextListener.php index b9045bffb68..bf6f36e8daa 100644 --- a/src/Oro/Bundle/SecurityBundle/EventListener/RefreshContextListener.php +++ b/src/Oro/Bundle/SecurityBundle/EventListener/RefreshContextListener.php @@ -87,19 +87,21 @@ public function onClear(OnClearEventArgs $event) */ protected function refreshEntity($entity) { - if ($entity instanceof Proxy && !$entity->__isInitialized()) { - $entity->__load(); - } - - if (!$this->doctrineHelper->getSingleEntityIdentifier($entity)) { - return null; - } - $entityClass = ClassUtils::getClass($entity); + $entityId = $this->doctrineHelper->getSingleEntityIdentifier($entity); /** @var EntityManager $entityManager */ $entityManager = $this->registry->getManagerForClass($entityClass); + if (!$entityId) { + return null; + } + + if ($entity instanceof Proxy && !$entity->__isInitialized()) { + // We cannot use $entity->__load(); because of bug BAP-7851 + return $entityManager->find($entityClass, $entityId); + } + return $entityManager->merge($entity); } }