Merge branch 'hotfix/#6941-#6943-undefined-constant-check-in-test-suite'

Close #6941
Close #6943
Fixes latest build on master : trailing_spaces
Merge branch 'cs/#6939-trailing-spaces-in-zend-validator-hostname' into develop

Close #6939
Forward port #6939