Skip to content

v3.0.3

  • v3.0.3
  • 8141dd7
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v3.0.3
  • 8141dd7
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@lyrixx lyrixx tagged this 09 Nov 19:30
Under some circumstance, the entity could be a proxy.

This is due to a combinaison of different factors:

* The current admin screen (organization) is on a sub property of the
user
* The connected user / admin has relation or not the the organization
* Doctrine might lazy load admin's organization
* Doctrine has internal caches in UOW, and returns entity or proxy when
loaded

So sometime, The following method [1] returns an instance of
`AppBundle\Entity\Organization`, and sometimes an instance of
`Proxies\__CG__\AppBundle\Entity\Organization`.

Thanks to this patch, we always retrieves the correct information
metadata.

---

Oh, I forget to describe the original bug! When a proxy is returned, the
`EmbeddedListHelper` class could not find metadata. So it could not
filter the
sub list. So the admin screen displays all projetcs (not for the current
organization but of the whole application :D )

[1]
https://github.com/EasyCorp/EasyAdminBundle/blob/bb128e7f19b4ec419cccdf773292a1ec3ee31978/src/EventListener/RequestPostInitializeListener.php#L68
Assets 2
Loading