The source project of this merge request has been removed.
Add ClassFinder::namespaceHasClasses instead of throwing on empty namespaces
Changes
This PR changes the behaviour of ClassFinder::getClassesForNamespace to simply return an empty list of classes
if there aren't any present in a given namespace.
I added ClassFinder::namespaceHasClasses to determine if a namespace contains any classes at all.
Reasoning
This has come up in a project of ours: https://github.com/nuwave/lighthouse/pull/948
Since we are scanning a configured directory for user-defined classes, we can not know in advance if there are any.
Edited by Benedikt Franke