Configurable exception on missing resource #36
referenced this pull request
Mar 28, 2017
Since php 5.6 has been dropped by this component, I've some doubt about this PR, and more generally with the current behavior when a resource isn't resolved. Following best practices, I would implement find methods with a return type, thus it can return only that type, and not null. If it's not found I would throw an exception. Currently, no exceptions are caught during resource resolution.
EDIT: Beside exceptions not caught, there's another problem: how to distinguish "ResourceNotFound" exceptions and legitimate exceptions? Do we need to force the use of a specific base class/interface? I guess it would be quite ugly :/