Navigating my app built with Symfony I discovered some mappings of some entities are inconsistent.
The Symfony Profiler tells me this:
AppBundle\Entity\Email The mappings AppBundle\Entity\Email#forCustomer and AppBundle\Entity\Customer#emails are inconsistent with each other.
and, in reverse:
AppBundle\Entity\Customer The association AppBundle\Entity\Customer#emails refers to the owning side field AppBundle\Entity\Email#owner which does not exist.
How can I check all entities in one time to discover this kind of inconsistency, without having to navigate all the app hoping I discover other inconsistencies?
For Symfony version lower than 3.4 you can try with:
app/console doctrine:schema:validate
and for Symfony 3.4 and 4.*:
bin/console doctrine:schema:validate
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With