How To Start PHP Storm Plugin Development For The First Time

phpstorm splash
Phpstorm version 2020.1

I was impressed by how smart Intellij IDEA and other jetbrains IDE products can be. If you use a framework, library or tool that the IDE doesn’t support, they also provide you with an API to develop your own plugin to support that framework or tool. 

Problem is, it is not as easy as flipping your hand. In fact it’s pretty much night mare, because the lack of documentation and also plugin development is usually a very complex thing, that sometimes your framework that you want to develop the plugin is radically different from the simple example they provide, so you need to figure it out yourself.

Recently I learned to develop a PHP framework plugin for PhpStorm, the framework is called Codeigniter. The framework is pretty much popular in the PHP world although kind of old and irrelevant to modern web application development using PHP compared to Symfony or Laravel.

But I decided to keep going and with spirits in mind that if anyone can then i’ll learn in the end i can accomplish it. I am really excited to learn IDE plugin dev for the first time in my life. 

So how to start PHPStorm plugin development?

git clone https://github.com/mudiadamz/phpstorm-plugin-starter.git

This is a skeleton for working PHPstorm plugin, you can just grab the codes and try to run it from gradle window > tasks > intellij > runIDE.

I hope this Post can be a panel for discussion on PHP storm plugin development. So if there’s any question please leave it in a comment.

The first week has been quite stressful, even just to start . The documentation is mainly for Intellij Java platform, even though it’s for all Intellij based platforms, to work with PHP is a bit tricky. Luckily there’s an example code from the Symfony plugin. But then the code is already too large so it’s kind of hard to follow. 

I am not giving up though, and finally after days of spinning my head not getting right the way I wanted to, after doing google looking for help with countless queries i typed in, i finally managed to at least make some code inspection.

Plugin development is really tough, especially if it’s involved in a non open source, because everything seems hidden. 

It’s a bit of a fair challenge to try if you are into software engineering, to develop a plugin for your favorite framework. Yeah i am not a pro software developer, i can only do some GUI stuff and little backend experiences.

Intellij IDEA really is a great tool for your application development, this IDE is the smartest i’ve ever used. Doing coding is much more efficient and you can avoid error prone as minimal as possible because the IDE is smart enough to do automatic code inspections for example the null pointer checking, they will tell you if the variable can cause nullpointerexception,etc.


Popular posts from this blog

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Create Spring Boot Project Using Netbeans

Spring Kafka - How to use ReplyingKafkaTemplate send and reply synchronously