Merge branch 'hotfix/3506'

Close #3506
Fixes #3113
Resolve undefined classes in phpDoc
Forward #3807