mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #5639] Improve the error by showing wich object entity was being used when t… #9671
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/5639
State: closed
Merged: No
…he method was detected missing
I had a error that didn't show which class didn't have the method, this litle hack allowed me to have that information.
The current error shows withouth the entity to which the method is missing.
request.CRITICAL: Uncaught PHP Exception BadMethodCallException: " Undefined method 'getAll'. The method name must start with either findBy or findOneBy!" at /home/andref/workspace/moneytrak/mt2/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php line 196 {"exception":"[object](BadMethodCallException: Undefined method 'getAll'. The method name must start with either findBy or findOneBy! at /home/andref/workspace/moneytrak/mt2/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:196)"} []
This change improves the error shown:
request.CRITICAL: Uncaught PHP Exception BadMethodCallException: "In Far\MT\AccountBundle\Entity\Holder Undefined method 'getAll'. The method name must start with either findBy or findOneBy!" at /home/andref/workspace/moneytrak/mt2/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php line 196 {"exception":"[object](BadMethodCallException: In Far\MT\AccountBundle\Entity\Holder Undefined method 'getAll'. The method name must start with either findBy or findOneBy! at /home/andref/workspace/moneytrak/mt2/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:196)"} []
Now I have the Entity to which the method is missing.
(BadMethodCallException: In Far\MT\AccountBundle\Entity\Holder