Supporting older versions of an IDE

Answered

I would like to make my plugin compatible with a wide range of PhpStorm versions.

Initially there were some issues with source code - for instance my plugin was making use of a VoidDataExternalizer, something that was not available in the OpenApi version 2016.1. So I started a new Java package called `compat` with a couple of classes that allow the plugin to run on PhpStorm 2016.1 through 2019.1.

The issue is that even though it is source compatible, it is not binary compatible. That is, I need to build using the 2016.1 SDK for 2016.1.

My question is, is there a known good way to figure out these 'version ranges'? I do not want to end up having to download 20 SDKs and then release 20 versions of my plugin! If I build using 2017.1 (say), and it works for both PhpStorm 2017.1 and 2018.1, can I avoid checking the versions inbetween?

3 comments
Comment actions Permalink

Using the minimal version to build should work since API is generally compatible in later versions.

You can use the Plugin Verifier immediately for uploaded versions of your plugin https://blog.jetbrains.com/platform/2018/07/plugins-repository-now-integrates-with-the-plugin-verification-tool/ or try the offline version https://github.com/JetBrains/intellij-plugin-verifier

We publish all known breakages here http://www.jetbrains.org/intellij/sdk/docs/reference_guide/api_changes_list.html, please report your additional findings in this thread for advice. Thank you!

1
Comment actions Permalink

Welp, I must have been doing something wrong before. I followed your advice now and built it using the following libraries. Works perfectly in both PhpStorm 2016.1.1 and 2019.1.1!

<orderEntry type="jdk" jdkName="IntelliJ IDEA IU-145.2070.6" jdkType="IDEA JDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="PROVIDED">
<library>
<CLASSES>
<root url="jar://C:/Program Files (x86)/JetBrains/PhpStorm 2016.1.2/plugins/php/lib/php-openapi.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" scope="PROVIDED">
<library>
<CLASSES>
<root url="jar://C:/Program Files (x86)/JetBrains/PhpStorm 2016.1.2/plugins/php/lib/php.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>

Basically I need to figure out which PhpStorm version I want to support, build using that, and make sure that both the IntelliJ IDEA Ultimate _and_ PhpStorm OpenAPI versions match up (at least up to minor versions, meaning IDEA IU 2016.1.1 + PhpStorm 2016.1.2 is fine), correct?

Thanks very much for the help, Yann.

0
Comment actions Permalink

Yes, base IJ Platform and PHP OpenAPI version must match here.

1

Please sign in to leave a comment.