Merge branch 'hotfix/#6946-ignore-php-5-5-scalar-class-name-resolution'

Close #6946
Close #6814
Improve type hints
Merge branch 'cs/#6948-improve-hydrator-type-hints' into develop

Close #6948
Forward port #6948