Interview with Matouš about news in PhpStorm plugins

4 years ago by Honza Černý translated by Depka  

If you use PhpStorm you certainly have plugins installed for better interoperability with Nette Framework. I’m talking specifically about Nette framework helpers, Latte, Neon, Nette Tester a Nette factory interface generator. They were created and maintained by many other authors e.g. Jan Doleček, Jan Tvrdík, David Matějka or Jirka Pudil (and certainly many other contributors). Today i had the opportunity to make interview with a programmer who revived the development of these plugins and his name is Matouš Němec.

Hi Matouš, I’ve noticed quite a big activity regarding development of PhpStorm plugins that are tied to Nette Framework. How long have you played with its development before you released your first update ? And what lead you to do that ?

I have first encountered it probably two years ago but I have only only looked at the code which frightened me and that was all. Last year in November I decided that the plugins need to move forward and I felt the need to do it so I can save some time when coding. So firstly it was only about me, but when I published it on Slack and received lots of positive reactions I realized that this will be bigger than I anticipated when I was starting 😀

I’ve been inclining to Java lately so it’s also my motivation to get better in it. To completely answer your question, it’s been almost 4 months since I started developing and maintaining these plugins 🙂

The fact that I can communicate with previous authors is also a great advantage.

Four months is both long and short period, depends on the angle of view. I think that being motivated by positive feedback can work as great forward pushing force. What can you say about plugin API and overall documentation after 4 months of coding ?

Yes, it’s great to have this positive feedback, but for me it’s more like a cherry on top of the cake. If it were only about the positive feedback I don’t think that I would do it for longer time period.

After 4 months I at least feel like someone who knows something about developing plugins for IntelliJ platforms 😀 I’m still having black gaps especially in areas that are not documented. The documentation became better in past few years but there’s still lot of things that you need to reverse engineer from other plugins or even from IntelliJ code.

Some things has been answered in JetBrains forum, but when you’re googling such things you most often end up on article for user and not for developers.

It all started with Latte plugin? Nowadays you are contributing also to Neon, Tester and Nette. Do you have any favorite plugin that you want to develop amongst the others?

Yes, it all started with Latte plugin, because there are most of the methods where I needed to see it’s usage in templates when I was clicking through it. Without this feature, refactoring was always kind of hell, especially for methods with commona names e.g. getName.

Afterwards my effort was extended to other plugins, for example, I missed line markers and run configuration via remote interpreters in the tester. In Neon i missed the ability to click on the used classes and possibly on the methods used under the “setup:” key. Having the experience with the Latte plugin was great for editing the other plugins.

I still like the Latte plugin most because it is very complex plugin that solves the lots of things. So I usually develop there and then apply the learned experience to other plugins.

Can you summarize what’s new in Latte plugin that came out last week to the plugin store?

In Latte, the most important point is that it is now possible to specify a template type or a variable type using new macros. This way, the plugin knows what methods, properties and constants can be called on a given variable. The plugin also highlights non-existent classes, methods, and other PHP elements. Another very important feature is autocompleting and it’s completion. It can also add a paired tag or trailing brace if it’s missing. And other such features that save time when typing. I hope that Latte will code almost alone in the future 😀

Of course, the most important thing is to click from PHP to Latte where the PHP elements are used and the support for renaming when refactoring. That is why my initiative was born iin the first place.

So you mentioned things that users will find in the plugin, do you have other things in progress that we can look forward to? Like a small peep under the hood?

Yes, I am currently working on the Neon plugin, where auto suggestion of basic keys associated with Nette FW will be improved. Overall, the keys will now know their type and it will also be checked, for example, that INT is used here even if BOOL is required. References for the methods used under the “setup:” key for service definitions (this would be ideal in CompilerExtension), but I don't know yet if it will be possible. I also want Neon to be able to pull extensions and config scheme out of them so that auto suggestions will work for custom extensions as well.

For the Latte plugin, there are two major features planned and this is optional chaining and support for array typehints, such as string[] or FooClass[], to suggest it correctly when used in foreach or ArrayAccess.

Thanks a lot for describing what you are doing now and what awaits us. Let's go to the last question. Is there anything I or someone else can do for you? Are you considering financial support for development? Or how and where to send ideas for improvement?

I plan to transfer all GIST issues into issues for individual GitHub repositories. So add please ideas and what you might want there with the label enhancement.

As for the financial support, I will welcome it. It is always easier to program if someone supports it 🙂 There’s a link to PayPal and account number on the forum. I have learned about the possibility of donations through Patreon or GitHub, where it is said to be able to send donations regularly, so I need to set it up. I also think that getting 100 CZK per month is far better than 2000 CZK once.

Or for companies I am able to create an invoice if they want. The improved plug-ins save money mainly for companies after all.

Otherwise, if someone is interested and would like to be involved in the development of plugins, then I would like to share experience with development and we can cooperate 🙂

Thank you for an interview

More about plugins updates, You can find in Nette forum

You can support Matouš at patreon.com/mesour.