If the issue is not resolved by composer dump-autoload
or is not a newly created class.
Check for syntax errors in your class and its traits as well.
In my case, there was a syntax error in a Trait, but ReflectionException
was shown for the actual Class using that Trait instead.