Skip to content

Commit af86b5d

Browse files
author
Vitaliy Boyko
committed
Merge branch '2.0.0-develop' of github.com:magento/magento2-phpstorm-plugin into 89-UI-component-form-generation
� Conflicts: � resources/META-INF/plugin.xml
2 parents dc66b27 + 903d781 commit af86b5d

File tree

163 files changed

+7918
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+7918
-409
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Run automated tests
55

66
on:
77
pull_request:
8-
branches: [ master, 1.0.0-develop, 1.0.1-develop ]
8+
branches: [ master, 1.0.2-develop, 2.0.0-develop ]
99

1010
jobs:
1111
build-linux:
@@ -74,7 +74,7 @@ jobs:
7474
- name: Grant execute permission for gradlew
7575
run: chmod +x gradlew
7676
- id: file_changes
77-
uses: trilom/[email protected].3
77+
uses: trilom/[email protected].4
7878
- name: Run Code Style Check
7979
run: ./gradlew checkstyleCI -i --no-daemon
8080
env:

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
1.0.1
2+
=============
3+
* Features:
4+
* Create a CLI command action
5+
* Create a CRON group action
6+
* Create a CRON job action
7+
* Create a Controller action
8+
* Code Inspection: Module declaration inspections in the scope of `module.xml` and `registration.php`
9+
* Code Inspection: GraphQL resolver in the scope of a schema file
10+
* Improvements:
11+
* Fixed the positioning of all dialog popups
12+
* Adjusted Magento root validation for consider `magento/framework` as a requirement
13+
* Adjusted Magento version validation RegExp to support patch versions
14+
* Fixed bugs:
15+
* The `create a plugin action` is accessible from the wrong context
16+
* Null pointer exception on the new module group
17+
118
1.0.0
219
=============
320
* Features:
@@ -108,4 +125,4 @@
108125
0.0.5
109126
=============
110127
* Features:
111-
* Added reference support for classes/interfaces in DI configuration
128+
* Added reference support for classes/interfaces in DI configuration

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This is a plugin for Magento 2 development in the PhpStorm IDE. It is available
1515
6. Check `Enable` and `OK` button.
1616

1717
## Works with
18-
* PhpStorm >= 2019.3.3
18+
* PhpStorm >= 2020.1.1
1919
* JRE >= 1.8
2020

2121
## Features

build.gradle

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
plugins {
7-
id 'org.jetbrains.intellij' version '0.4.15'
7+
id 'org.jetbrains.intellij' version '0.4.22'
88
id 'checkstyle'
99
id 'pmd'
1010
}
@@ -14,14 +14,14 @@ repositories {
1414
}
1515

1616
group 'com.magento.idea'
17-
version '1.0.1'
17+
version '2.0.0'
1818

1919
apply plugin: 'org.jetbrains.intellij'
2020
apply plugin: 'java'
2121
apply plugin: 'groovy'
2222

23-
def phpPluginVersion = System.getProperty("phpPluginVersion", "193.6494.35")
24-
def ideaVersion = System.getProperty("ideaVersion", "2019.3.3")
23+
def phpPluginVersion = System.getProperty("phpPluginVersion", "201.7223.91")
24+
def ideaVersion = System.getProperty("ideaVersion", "2020.1.1")
2525
def javaVersion = 1.8
2626

2727
sourceCompatibility = javaVersion
@@ -31,7 +31,17 @@ intellij {
3131
version ideaVersion
3232
type 'IU'
3333
pluginName 'com.magento.idea.magento2plugin'
34-
plugins = ["com.jetbrains.php:$phpPluginVersion", 'yaml', 'java-i18n', 'properties', 'CSS', 'JavaScriptLanguage', 'com.intellij.lang.jsgraphql:2.3.0']
34+
plugins = [
35+
"com.jetbrains.php:$phpPluginVersion",
36+
'yaml',
37+
'java-i18n',
38+
'properties',
39+
'CSS',
40+
'JavaScriptLanguage',
41+
'com.intellij.lang.jsgraphql:2.3.0',
42+
'platform-images',
43+
'copyright'
44+
]
3545
updateSinceUntilBuild false
3646
sameSinceUntilBuild false
3747
downloadSources !Boolean.valueOf(System.getenv('CI'))

gradle-tasks/checkstyle/checkstyle.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,5 +322,12 @@
322322
default="checkstyle-xpath-suppressions.xml" />
323323
<property name="optional" value="true"/>
324324
</module>
325+
<module name="SuppressWarningsHolder"/>
326+
<module name="SuppressWithNearbyCommentFilter">
327+
<property name="commentFormat" value="CHECKSTYLE IGNORE (\w+) FOR NEXT (\d+) LINES"/>
328+
<property name="checkFormat" value="$1"/>
329+
<property name="influenceFormat" value="$2"/>
330+
</module>
325331
</module>
326-
</module>
332+
<module name="SuppressWarningsFilter"/>
333+
</module>

gradle-tasks/pmd/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<rule ref="category/java/errorprone.xml">
3333
<exclude name="BeanMembersShouldSerialize"/>
3434
<exclude name="DataflowAnomalyAnalysis"/>
35+
<exclude name="MissingSerialVersionUID"/>
3536
</rule>
3637
<exclude-pattern>.*/resources/.*</exclude-pattern>
3738
<exclude-pattern>.*/testData/.*</exclude-pattern>

resources/META-INF/plugin.xml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<idea-plugin>
88
<id>com.magento.idea.magento2plugin</id>
99
<name>Magento PhpStorm</name>
10-
<version>1.0.1</version>
10+
<version>2.0.0</version>
1111
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>
1212

1313
<description><![CDATA[
@@ -24,7 +24,7 @@
2424
</change-notes>
2525

2626
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Build+Number+Ranges for description -->
27-
<idea-version since-build="193.6494.35"/>
27+
<idea-version since-build="201.7223.91"/>
2828

2929
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
3030
on how to target different products -->
@@ -34,6 +34,8 @@
3434
<depends>com.jetbrains.php</depends>
3535
<depends>JavaScript</depends>
3636
<depends>com.intellij.modules.platform</depends>
37+
<depends>com.intellij.platform.images</depends>
38+
<depends>com.intellij.copyright</depends>
3739
<depends optional="true" config-file="withJsGraphQl.xml">com.intellij.lang.jsgraphql</depends>
3840

3941
<actions>
@@ -59,10 +61,11 @@
5961
<action id="MagentoCreateABlock" class="com.magento.idea.magento2plugin.actions.generation.NewBlockAction" />
6062
<action id="MagentoCreateAController" class="com.magento.idea.magento2plugin.actions.generation.NewControllerAction" />
6163
<action id="MagentoCreateACronjob" class="com.magento.idea.magento2plugin.actions.generation.NewCronjobAction" />
64+
<action id="MagentoCreateACronGroup" class="com.magento.idea.magento2plugin.actions.generation.NewCronGroupAction" />
6265
<action id="MagentoCreateAViewModel" class="com.magento.idea.magento2plugin.actions.generation.NewViewModelAction" />
6366
<action id="MagentoCreateAGraphQlResolver" class="com.magento.idea.magento2plugin.actions.generation.NewGraphQlResolverAction" />
6467
<action id="MagentoCreateCLICommand" class="com.magento.idea.magento2plugin.actions.generation.NewCLICommandAction" />
65-
<action id="MagentoCreateAController" class="com.magento.idea.magento2plugin.actions.generation.NewUiFormAction" />
68+
<action id="MagentoCreateUiComponentGrid" class="com.magento.idea.magento2plugin.actions.generation.NewUiComponentGridAction" />
6669
<add-to-group group-id="NewGroup" anchor="last"/>
6770
</group>
6871

@@ -80,6 +83,12 @@
8083
<action id="OverrideClassByAPreference.Menu" class="com.magento.idea.magento2plugin.actions.generation.OverrideClassByAPreferenceAction">
8184
<add-to-group group-id="EditorPopupMenu"/>
8285
</action>
86+
<action id="InjectAViewModelAction.Menu" class="com.magento.idea.magento2plugin.actions.generation.InjectAViewModelAction">
87+
<add-to-group group-id="EditorPopupMenu"/>
88+
</action>
89+
<action id="OverrideInTheme.Menu" class="com.magento.idea.magento2plugin.actions.generation.OverrideInThemeAction">
90+
<add-to-group group-id="ProjectViewPopupMenu"/>
91+
</action>
8392

8493
</actions>
8594

@@ -113,6 +122,7 @@
113122
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.mftf.TestNameIndex" />
114123
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.js.RequireJsIndex" />
115124
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.js.MagentoLibJsIndex" />
125+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.xml.AclResourceIndex" />
116126

117127
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.PluginLineMarkerProvider"/>
118128
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.PluginTargetLineMarkerProvider"/>
@@ -128,6 +138,14 @@
128138
level="ERROR"
129139
implementationClass="com.magento.idea.magento2plugin.inspections.php.PluginInspection"/>
130140

141+
<localInspection language="PHP" groupPath="PHP"
142+
shortName="ModuleDeclarationInRegistrationPhpInspection"
143+
displayName="Inspection for the Module declaration in the `registration.php` file"
144+
groupName="Magento 2"
145+
enabledByDefault="true"
146+
level="ERROR"
147+
implementationClass="com.magento.idea.magento2plugin.inspections.php.ModuleDeclarationInRegistrationPhpInspection"/>
148+
131149
<localInspection language="XML" groupPath="XML"
132150
shortName="ObserverDeclarationInspection"
133151
displayName="Duplicated Observer Usage in events XML"
@@ -151,6 +169,20 @@
151169
enabledByDefault="true" level="WARNING"
152170
implementationClass="com.magento.idea.magento2plugin.inspections.xml.CacheableFalseInDefaultLayoutInspection"/>
153171

172+
<localInspection language="XML" groupPath="XML"
173+
shortName="ModuleDeclarationInModuleXmlInspection"
174+
displayName="Inspection for the Module declaration in the `etc/module.xml` file"
175+
groupName="Magento 2"
176+
enabledByDefault="true" level="ERROR"
177+
implementationClass="com.magento.idea.magento2plugin.inspections.xml.ModuleDeclarationInModuleXmlInspection"/>
178+
179+
<localInspection language="XML" groupPath="XML"
180+
shortName="AclResourceXmlInspection"
181+
displayName="Inspection for the Title XML required attribute in the `etc/acl.xml` file"
182+
groupName="Magento 2"
183+
enabledByDefault="true" level="ERROR"
184+
implementationClass="com.magento.idea.magento2plugin.inspections.xml.AclResourceXmlInspection"/>
185+
154186
<libraryRoot id=".phpstorm.meta.php" path=".phpstorm.meta.php/" runtime="false"/>
155187

156188
<internalFileTemplate name="Magento Module Composer"/>
@@ -164,9 +196,15 @@
164196
<internalFileTemplate name="Magento GraphQL Resolver Class"/>
165197
<internalFileTemplate name="Magento Cronjob Class"/>
166198
<internalFileTemplate name="Magento Crontab Xml"/>
167-
<internalFileTemplate name="Magento CLI Command"/>
199+
<internalFileTemplate name="Magento CLI Command Class"/>
168200
<internalFileTemplate name="Magento Module Controller Backend Class"/>
169201
<internalFileTemplate name="Magento Module Controller Frontend Class"/>
202+
<internalFileTemplate name="Magento Module Cron Groups Xml"/>
203+
<internalFileTemplate name="Magento Module UI Component Grid Xml"/>
204+
<internalFileTemplate name="Magento Module Ui Grid Collection Data Provider Php"/>
205+
<internalFileTemplate name="Magento Module Ui Grid Custom Data Provider Php"/>
206+
207+
<postStartupActivity implementation="com.magento.idea.magento2plugin.project.startup.CheckIfMagentoPathIsValidActivity"/>
170208
</extensions>
171209

172210
<extensions defaultExtensionNs="com.jetbrains.php">

resources/META-INF/pluginIcon.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
/*
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html>
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td>
12+
<font face="verdana" size="-1">Constructor arguments. The object manager injects these arguments into the class during creation. The name of the argument configured in the XML file must correspond to the name of the parameter in the constructor in the configured class.</font>
13+
</td>
14+
</tr>
15+
</table>
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)