Video Lesson: Set up the Magento PhpStorm plugin in Docker

Set up the Magento PhpStorm plugin in Docker

Learn how to configure an IDE plugin to provide framework specific features for a project.


Lesson Content

Before the Magento-specific features work, install the Magento PhpStorm plugin.

Open PhpStorm -> Preferences, select Plugins, and open the Marketplace tab. Search for Magento. The Magento PhpStorm plugin is usually the first result. Verify that it has more than 100,000 downloads, then click Install.

When the installation finishes, click OK and restart PhpStorm when prompted. PhpStorm reindexes the Magento project after restarting.

The plugin is installed, but you still need to enable its Magento integration for this project. Open PhpStorm -> Preferences, expand PHP, and select Frameworks. You’ll see a new Magento section. Expand it and select Enable Magento integration.

Next, define the Magento installation path. Click the folder icon and select the src directory in your Magento installation. PhpStorm detects the installed Magento version, which confirms that it has found the correct installation.

Click OK. PhpStorm reindexes the project again. After indexing finishes, you can use Cmd+Click on JavaScript dependencies such as mage/storage to open their source files directly.

The plugin also helps with layout XML, but the schema location requires one additional step. Restart PhpStorm after the Magento integration finishes configuring. Once PhpStorm has reindexed the project, open PhpStorm -> Preferences again and click Regenerate URN Mappings. Click OK when the mappings finish generating.

The red underline disappears from the noNamespaceSchemaLocation value. You can now use Cmd+Click on it to open the schema file where the directive is defined. You can also use Cmd+Click on Magento classes in layout XML, such as block classes, to open their source files directly.

Maggie

Hey, I'm Maggie! 👋

Ask me anything.

Want to chat with Maggie?

Log in for AI tutor access.

Comments

Join the discussion!

Notes

Keep track of what you learn!