Describe the bug
If EntityCollection->getById() is called with a not existing id, the following exception is thrown:
Uncaught ErrorException: Undefined array key 0
The method should return null (like getFirst()) instead of throwing an exception.
To Reproduce
- Create a model, mapping and EntityCollection
- Call
EntityCollection->getById() and pass a not existing id
Additional information
AVOLUTIONS version: 0.9.0-alpha
PHP version: 8.0