-
Notifications
You must be signed in to change notification settings - Fork 105
1.0.0 Release
This major release includes MFTF support, RequireJS mapping support, GraphQL support, Plugin declaration inspection, code generation and many more.
The code generation is one of the most wanted feature in Magento community. There is a bunch of existing open source solutions, however, generating code using the IDE seems to be the most convenient way to go. Therefore several actions were created to help with common Magento 2 customizations. This list will be extended in the future.
All templates used for generation can be found and edited in Preferences/Settings | Editor | File and Code Templates
.
New Magento 2 module can be created from the context menu or by pressing Ctrl(⌘)+N.
This should be useful for extension developers. When the project is created IDE suggests selecting the PHP version and suggests including the Magento source code to PHP include paths.
The action creates a plugin class method along with a plugin declaration record in di.xml in the scope of the specified module and area. A plugin class and di.xml being created if needed.
The action creates a class along with a preference declaration record in di.xml in the scope of the specified module and area.
New observer can be created from the context menu. Just right click on the event name and specify the module, area, and observer name.
Several actions were added for creating module files from templates.
- Block:
- ViewModel:
- GraphQL Resolver:
New plugin method can be created from the context menu (generate...) or by pressing Ctrl(⌘)+N.
Inspection highlights the following cases:
- Plugin declared for a final class
- Plugin declared for a final method
- Plugin declared for a constructor
- Plugin declared for a not public method
- Plugin declared for a static method
- Incompatible parameter
- Redundant parameter
This inspection highlights possible accidental plugin duplication. Plugin name must be unique. In case if overriding is wanted, the best practice is to disable the original plugin and give a unique name to the current plugin.
Inspection for observer declaration records, similar to plugin one.
If a class is configured in schema.GraphQLs
as a resolver, it should implement one of the resolver interfaces.
This inspection highlights the cacheable
attribute which is set to be false in default.xml as that can make the whole site uncacheable.
In the previous version existed a possibility to navigate from the target class and method to the plugin class and method via line markers. Now line markers for the navigation were added in the opposite direction.
Support of the most commonly used MFTF XML directives were added.
- Page URL completion and reference
- Action group completion and reference
- Test extends attribute completion and reference
- Selector completion and reference
The RequireJS configuration file requirejs-config.js
is commonly used in the different areas of Magento 2. There is a possibility to make aliases for a component using it. We added support of this mapping to have an ability to easily navigate between JS files.
- Reference on injected argument
- Completion and reference in XML
Sometimes you may need to quickly navigate from GraphQL resolver to schema and vice versa. Line markers were added to make it possible. To use this functionality please install GraphQLJS plugin.
Thanks to our awesome contributors who made this release possible:
Vasilii Burlacu, Roman Glushko, Vitaliy Boyko, Eduard Chitoraga, Max Mezhensky, Yaroslav Rogoza, Andrew Chornij - Atwix