Basically what I've seen in many frameworkds is having a Registry/DIC/Service registry to which the developer makes calls to retrieve a class/object.
It is very widespread and more than 50% of my code and guess lots of other people is related to making calls like this:
$mailer = $services->get('mail');
After I do this all the intelligence of autosuggestions, parameter suggestion.... all the sweetness is gone.
Is there a way to describe the return type with annotations? Something like:
@return $service_name 'mail' \Swift\Mailer | 'response' \Response
A guide how to extend the annotation functionallity for certain classes into a plugin will be useful too. Like a framework-based plugin?