Open Koc opened 11 years ago
i have similiar problems at worktime, iam trying to resolve it step by step, but most is limited by phpstorm api and currently not possible, but my plans:
twig should provide support also for "Method References". but in phpstorm6 twig api is a nightmare. in 7 the twig api stuff is completely rewritten. also contacted twig maintainer. hopefully they will implemented some of the wishes
@Haehnchen does something changed in the PHPStorm API for the last monthes?
we have some more possibilities, but most work need to be done on our side. target is to remove deps on java and provide some more external configs see also #245.
i prefer to use some xml files with a unique name so we can index them.
quick example:
<item language="php" instance="\FooInterface" method="getHelper" value="VendorProjectsBundle:Custom">
<return>\Foo\Class</return>
</item>
<item language="twig" function="brouzie_helper" value="VendorProjectsBundle:Custom">
<return>\Foo\Class</return>
</item>
feel free to extend it :)
So after this I should just create php script which generates this xml and it will work? Sounds good.
@Haehnchen can you continue work on this feature, please?
IMHO structure can be changed into
<item language="php" instance="\FooInterface" method="getHelper">
<rule>
<argument>VendorProjectsBundle</argument>
<return>\Foo\ClassOne</return>
<rule>
<rule>
<argument>VendorProjectsBundle</argument>
<argument>Custom</argument>
<return>\Foo\ClassTwo</return>
<rule>
</item>
It adds next pros:
item
nodeyes. much better. but i dont know when to go for integration right now...
Hello dear developers!
How can I extends this plugin to add support of custom autocomplete? For example we have twig function:
which return instance of
%VendorProjectsBundle%\Helper\CustomHelper
where%VendorProjectsBundle%
is a bundle namespace. So it would be nice to add 2 autocompletes here:{{ someHelper .{# ... #} }}
Also there is possible thing in php code:
Ideally to extends without changing java code, via configuration or configuration files.