given this:
namespace yyy;
use Some\Namespace\SomeDependency;
class X{
/**
* @Inject
* @var SomeDependency
*/
protected $serviceFactory = null;
}
I've found that the classDefintion is attempting to resolve a class "yyy\SomeDependency" prior to attempting to resolve "Some\Namespace\SomeDependency" .
The code (PhpDocParser::getPropertyType) seems to attempt to resolve the type from the namespace of the injection target prior to the fully qualified name coming form a use statement.
Is this the correct behaviour? I would think that the use statement forces the SomeDependency alias to resolve to Some\Namespace\SomeDependency for the entire class defintion (or better code scoped under that use statement) such that it could never point to a "yyy\SomeDependency" type. Although i may be wrong with PHP's naming resolution here...