Jira issue originally created by user quazardous:
I find not always portable-friendly the use of full class path in DQL.
$query = $em->createQuery('SELECT u FROM \MyProject\Model\User u WHERE u.age > 20');
could be :
$query = $em->createQuery('USE \MyProject\Model SELECT u FROM User u WHERE u.age > 20');
$query = $em->use('\MyProject\Model')->createQuery('SELECT u FROM User u WHERE u.age > 20');
And with a default namespace attached to the entity manager :
$query = $em->use()->createQuery('SELECT u FROM User u WHERE u.age > 20');
Comment created by @ocramius:
In strings, you always use the fully qualified class name, or an entity alias
Comment created by quazardous:
yes :p and so it's not symmetrical with PHP coding...
it's unesthetic and when you do code refactoring it's harder than just managing your use "namespace";
but i've put priority to minor ;p
[~quazardous] I'm closing this. Strings are values passed around in your system, and having their meaning depend on context is absolutely a no-go
Issue was closed with resolution "Invalid"