|
If you find this plugin helpful and want to support its development, consider buying the contributors a coffee: ( (
) )
........
| |]
\ /
`----'
Buy Me a Coffee
Thank you to our sponsors for supporting the plugin: Lucas van Staden Ivan Chepurnyi Michael Ryvlin |
- Configuration smart completion and references for XML/JavaScript files
Navigate to configurationreference in scope of class/interfaceGo to pluginreference in scope of class/interface and methodNavigate to Web API configurationreference in scope of class/interface and method- Plugin class methods generation
- Plugin declaration inspection
- Magento-specific MCP tools for AI agents
- RequireJS reference navigation and completion
- MFTF reference navigation and completion
- GraphQL navigation line markers
- Code generation
- Inspections for XML configuration
- Go to
Settings > Preferencesin the PhpStorm IDE - Navigate to
Plugins - Click the
Browse repositories...button and search for "Magento 2 and Adobe Commerce Support" - Install the plugin and restart PhpStorm
- Go to
Settings > Preferences > Languages & Frameworks > PHP > Frameworks > Magentoin the PhpStorm IDE - Check
Enableand click theOKbutton
- PhpStorm 2026+
The plugin exposes a Magento-specific MCP toolset for AI agents inside JetBrains IDEs with MCP support enabled.
Available project and creation tools:
get_magento_root_path: returns the resolved Magento root directory for the current IDE project. Use this when an agent or shell command needs an absolute project path.create_magento_module: creates a new Magento module withcomposer.json,registration.php, andetc/module.xml. Pass Magento module parts such aspackageName=FooandmoduleName=Barto createFoo_Bar; the Composer package name is derived automatically asfoo/module-bar.create_magento_plugin: creates a plugin class and the matchingdi.xmldeclaration.moduleNamemust beVendor_Module,targetClassNamemust be an existing PHP FQN such asMagento\\Catalog\\Api\\ProductRepositoryInterface,targetMethodNameis the intercepted method name, andpluginTypemust bebefore,around, orafter.create_magento_observer: creates an observer class andevents.xmldeclaration.moduleNamemust beVendor_Module,eventNameshould be a Magento event such ascatalog_product_save_after, andobserverClassFqnshould live inside the module namespace, usually underObserver\\.create_magento_entity_crud: scaffolds a Magento CRUD module area including DB schema, model, resource model, collection, repository-related classes, ACL/menu entries, and optional admin UI pieces.propertiesmust be a list offield_name:typevalues such as["title:string", "is_active:bool"]; the primary ID field is generated automatically.create_magento_controller: creates a controller class in an editable module.controllerClassFqnmust be under the moduleControllernamespace, for exampleFoo\\Bar\\Controller\\Index\\IndexorFoo\\Bar\\Controller\\Adminhtml\\Order\\Index, andhttpMethodmust beGET,POST,PUT, orDELETE.create_magento_cli_command: creates a Symfony console command class and registers it inetc/di.xml.commandClassFqnusually belongs underConsole\\Command, andcommandNameshould be a Magento CLI command name such asfoo:bar:sync-data.create_magento_block: creates a block class under the moduleBlock\\namespace, for exampleFoo\\Bar\\Block\\Product\\BadgeBlock.create_magento_view_model: creates a view model class under the moduleViewModel\\namespace, for exampleFoo\\Bar\\ViewModel\\Product\\BadgeViewModel.create_magento_product_eav_attribute: creates a product EAV attribute data patch and optional source model.attributeCodemust be lower_snake_case,backendTypeandfrontendInputmust be valid Magento attribute types, andoptionsmay only be used forselectormultiselect.create_magento_category_eav_attribute: creates a category EAV attribute data patch,view/adminhtml/ui_component/category_form.xml, and an optional source model using the same attribute format rules as the product tool.create_magento_customer_eav_attribute: creates a customer EAV attribute data patch and optional source model using Magento customer attribute rules.
Available query and inspection tools:
find_magento_module: finds modules by exact or partial Magento module name such asMagento_Catalog,Foo_Bar,Catalog, orMagento_. Use this to confirm the canonical module name and path before generating code.find_di_config_for_class: findsdi.xmldeclarations related to a PHP FQN or virtual type name such asMagento\\Catalog\\Model\\ProductorcatalogProductRepository. Use this to inspect preferences, virtual types, arguments, and related DI wiring before making changes.find_plugins_for_method: finds plugins for a target class or interface method. Pass a PHP FQN such asMagento\\Catalog\\Api\\ProductRepositoryInterfaceand a bare method name such assaveorgetById.find_observers_for_event: finds observers by full or partial event name such ascatalog_product_save_afterorproduct_saveand returns matchingevents.xmldeclarations.find_layout_entities: finds layout handles, block names, and container names by exact or partial value such ascatalog_product_view,product.info.main, orcheckout.find_ui_component: finds UI component XML definitions by exact or partial component file name such asproduct_form,sales_order_grid, orcategory_formwithout the.xmlextension.find_acl_or_menu: finds ACL resource IDs and admin menu entries by exact or partial identifier such asMagento_Catalog::catalogorFoo_Bar::manage_items.describe_magento_cli_environment: detects project-local CLI wrappers such as Mark Shust Docker scripts underbin/, returns the exact command paths an agent should use, and includes example invocations for Magento CLI, PHP, Composer, andn98-magerun.
Notes:
- The IDE MCP server must be enabled in the JetBrains IDE.
- The IDE MCP server entry must be added to the agent MCP configuration.
- MCP tools work against the currently opened IDE project.
- Magento plugin support must be enabled for the project.
- Indexing must be finished before MCP queries and generators can run.
- Category EAV attribute generation creates both the data patch and
view/adminhtml/ui_component/category_form.xml. describe_magento_cli_environmentdetects project-local wrappers such as Mark Shust Docker scripts underbin/and returns the exact command paths an agent should use.
If your Magento project uses local wrapper scripts such as Mark Shust Docker commands, configure them in:
Settings > Languages & Frameworks > PHP > Frameworks > Magento > MCP CLI wrapper candidates
Use a comma-separated list of relative paths, for example:
bin/magento, bin/n98-magerun2, bin/cli
Agent usage pattern:
- Call
describe_magento_cli_environment. - Use the returned wrapper path exactly, for example
./bin/magento cache:flushor./bin/n98-magerun2 sys:info. - Prefer the wrapper over global binaries because these scripts often enter Docker containers or a project-specific runtime.
- Check out this repository.
- Open the project in IntelliJ IDEA.
- Make sure that you are on the latest develop branch (for example
5.4.0-develop). - Import the Gradle project from
build.gradle.kts. - Use JDK 21 for both the project SDK and the Gradle JVM:
Right click on the project root > Open Module Settings > Project > Project SDKIntelliJ IDEA > Preferences > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM
- In the Gradle tool window, run
Tasks > Intellij platform > runIde. - The task launches a PhpStorm sandbox with the plugin installed. Make sure the plugin is enabled and indexing is finished before testing features.
- Start with looking into Community Backlog. Any ticket in
Ready for DevelopmentandGood First Issuecolumns are a good candidates to start. - Didn't satisfy your requirements? Create a new issue. It can be for example:
- Bug report - Found a bug in the code? Let us know!
- Enhancement - Know how to improve existing functionality? Open an issue describe how to enhance the plugin.
- New feature proposal - Know how to make a killer feature? Do not hesitate to submit your proposal.
- The issue will appear in the
Ready for Groomingcolumn of the Community Backlog. Once it will be discussed and approved the issue will be ready for development. - Refer to the Contributing Guide for more information on how to contribute.
- SDK Developing a Plugin
- Good Presentation about platform How We Built Comma, the Raku IDE, on the IntelliJ Platform
- Plugin example idea-php-symfony2-plugin
- Create sandbox folder
- Copy to sandbox folder
composer.jsonandcomposer.lock - In sandbox folder create
app/codeandvendor/magento - Copy any of the magento modules (as for example:
framework,module-catalog,module-checkout,module-customer,module-sales) into thevendor/magentofolder. It is better to add as few modules as possible to reduce reindexing time during application running - (Nice to have) Open IDE and go to
Preferences > Editor > File and Code Templates > Includes taband add default headers forPHP File HeaderandXML File Header
PHP File Header:
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);XML File Header:
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
Join the #phpstorm-plugin Slack channel to get more involved
Each Magento source file included in this distribution is licensed under OSL-3.0 license.
Please read the LICENSE.txt for the full text of the Open Software License v. 3.0 (OSL-3.0).