When running the model:fields command if some of the classes being filtered (we are filtering only models) is not in correct namespace, ReflectionException : Class X\Y\Class does not exist will be thrown
Solution could be:
// File: src/Handlers/Helper.php
// This lines should be replaced with
if ($this->isAbstractClass($class) || $this->isInterface($class)) {
continue;
}
// those lines
try {
// If class is in wrong namespace code below will throw an error
// (reflection exception), so we wrap it like this to avoid it.
// Try to show error somewhere so user is aware of what's happening.
if ($this->isAbstractClass($class) || $this->isInterface($class)) {
continue;
}
} catch (\Throwable $e) {
continue;
}
When running the
model:fields
command if some of the classes being filtered (we are filtering only models) is not in correct namespace,ReflectionException : Class X\Y\Class does not exist
will be thrownSolution could be: