Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 226725 - Autocomplete methods for dependency injection container in symfony 2 and zendframewok 2
Autocomplete methods for dependency injection container in symfony 2 and zend...
Status: NEW
Product: php
Classification: Unclassified
Component: Symfony
PC Other
: P3 with 7 votes (vote)
Assigned To: Tomas Mysik
Depends on:
  Show dependency treegraph
Reported: 2013-02-26 16:59 UTC by dextervip
Modified: 2014-10-05 10:25 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description dextervip 2013-02-26 16:59:55 UTC

It would be super feature if netbeans could detects objects type from dependency injection container( and auto-complete with their methods.

For example, $this->container->get('doctrine') returns a Doctrine\Bundle\DoctrineBundle\Registry instance. In the container, the key doctrine corresponds to Doctrine\Bundle\DoctrineBundle\Registry.

Then netbeans could read container from console ´´php app/console container:debug´´ to discover which keys corresponds to which classes.

This would be an awesome feature, I am sure, A lot of developer will love it! It could be done as well for zendframework 2. I believe there are a lot of developers  that would like it.
Comment 1 Tomas Mysik 2013-02-27 11:42:14 UTC
Thanks for the report, we will try to look at it.
Comment 2 ndm 2014-01-25 19:49:52 UTC
The easiest way to parse the file app/cache/dev/appDevDebugProjectContainer.xml

This file provide all services informations, parameters, constructors :

 - name 
 - return type
 - scope
 - tags
 - call

The tag is services, with sub tag service for each of them.
Comment 3 fazae 2014-10-05 10:14:48 UTC
if it is too difficult, maybe we could use annotation. 

Today, it is working for class variable, but not for variable in methods.

Something like :
 // @var Doctrine\Bundle\DoctrineBundle\Registry
Comment 4 fazae 2014-10-05 10:25:37 UTC
Autocomplete works witrh netbeans if you use this syntax :

 /* @var $em \Doctrine\Bundle\DoctrineBundle\Registry */

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo