Intellij Idea Phpstorm



Introduction

Browse other questions tagged intellij-idea phpstorm simultaneous pair-programming or ask your own question. The Overflow Blog Introducing The Key. Podcast 326: What does being a “nerd” even mean these days? Featured on Meta Stack Overflow for Teams is now free for up to 50 users, forever. IntelliJ IDEA is ranked 5th while PhpStorm is ranked 12th. The most important reason people chose IntelliJ IDEA is: Uses a fast indexing technique to provide contextual hints (auto-completion, available object members, import suggestions). On-the-fly code analysis to detect errors and propose refactorization.

PhpStorm is an IntelliJ Platform-based product. Plugins for PhpStorm are developed in Java using the Ultimate edition of IntelliJ IDEA. The PsiViewer plugin is also recommended.

This page describes configuring plugin projects targeting PhpStorm. See also:

Configuring Plugin Projects Targeting PhpStorm

Intellij Download

The IntelliJ IDEA Ultimate Edition (with the PHP plugin) must be used for developing PhpStorm plugins because the PHP plugin is incompatible with IntelliJ IDEA Community Edition. However, this IntelliJ IDEA Ultimate configuration runs the risk of accidentally using some APIs that are not available in PhpStorm. The recommended best practice is to use PhpStorm for testing.

The OpenAPI is available for PhpStorm 6 and above.

Configuration of a Gradle-based PhpStorm plugin project is used as a tutorial in the section Configuring Plugin Projects using the IntelliJ IDEA Product Attribute. Many techniques are discussed, such as choosing a version of IntelliJ IDEA Ultimate given a targeted version of PhpStorm. The table below summarizes the gradle-intellij-plugin attributes to set in the build.gradle file for a PhpStorm plugin project:

The table below summarizes the gradle-intellij-plugin attributes to set in the plugin project's build.gradle file. Click on an entry in the table's Attribute column to go to the documentation about that attribute. To see how these attributes appear in the build.gradle file for PhpStorm, see Configuring build.gradle using the IntelliJ IDEA Product Attribute.

gradle-intellij-plugin AttributeAttribute Value
intellij.typeIU for IntelliJ IDEA Ultimate. The required PHP plugin isn't compatible with IntelliJ IDEA Community Edition.
intellij.versionSet to the same IU BRANCH.BUILD as the PhpStorm target version, e.g. 193.5233.102.
intellij.pluginscom.jetbrains.php:193.5233.102 for the PHP plugin.
See below for PHP plugin version information.
runIde.ideDirectoryPath to locally installed target version of PhpStorm. For example, on macOS:
/Users/<user name>/Library/Application Support/JetBrains/Toolbox/apps/PhpStorm/ch-0/193.5233.101/PhpStorm.app/Contents.

Intellij Idea Crack

The PHP plugin version is explicitly declared because it isn't bundled with IntelliJ IDEA Ultimate Edition. Select a version of the PHP plugin compatible with the intellij.version.

The dependency on the PHP plugin APIs must be declared in the plugin.xml file, as shown in the tutorial Configuring plugin.xml section.

The Java Virtual Machine (JVM) running IntelliJ IDEA allocates some predefined amount of memory. The default value depends on the platform. If you are experiencing slowdowns, you may want to increase the memory heap.

If you want to configure the heap size for the build process that compiles your code, open Settings/PreferencesCtrl+Alt+S, select Build, Execution, Deployment | Compiler, and specify the necessary amount of memory in the Build process heap size field.

  1. From the main menu, select Help | Change Memory Settings.

  2. Set the necessary amount of memory that you want to allocate and click Save and Restart.

This action changes the value of the -Xmx option used by the JVM and restarts IntelliJ IDEA with the new setting.

The Change Memory Settings action is available starting from IntelliJ IDEA version 2019.2. For previous versions or if the IDE crashes, you can change the value of the -Xmx option manually as described in JVM options.

IntelliJ IDEA also warns you if the amount of free heap memory after a garbage collection is less than 5% of the maximum heap size:

Click Configure to increase the amount of memory allocated by the JVM. If you are not sure what would be a good value, use the one suggested by IntelliJ IDEA.

Phpstorm

Click Save and Restart and wait for IntelliJ IDEA to restart with the new memory heap setting.

Enable the memory indicator

IntelliJ IDEA can show you the amount of used memory in the status bar. Use it to judge how much memory to allocate.

  • Right-click the status bar and select Memory Indicator.

Toolbox App

If you are using the Toolbox App, you can change the maximum allocated heap size for a specific IDE instance without starting it.

Intellij
  1. Open the Toolbox App, click next to the relevant IDE instance, and select Settings.

  2. In the instance settings dialog, expand Configuration and specify the heap size in the Maximum heap size field.

If the IDE instance is currently running, the new settings will take effect only after you restart it.

If you are using a standalone instance not managed by the Toolbox App, and you can't start it, it is possible to manually change the -Xmx option that controls the amount of allocated memory. Create a copy of the default JVM options file and change the value of the -Xmx option in it.