Skip to content

Commit 6a4fd99

Browse files
author
Roman Glushko
committed
Merge branch '1.0.1-develop' of https://github.com/magento/magento2-phpstorm-plugin into 184-setup-code-style-checks
# Conflicts: # build.gradle
2 parents eea4c47 + 03d84d2 commit 6a4fd99

File tree

127 files changed

+1653
-347
lines changed

Some content is hidden

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

127 files changed

+1653
-347
lines changed

.github/workflows/gradlepublish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will build a package using Gradle and then publish it to JetBrains repository when a release is created
2+
3+
name: Publish Plugin
4+
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up JDK 1.8
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 1.8
20+
- name: Gradle wrapper
21+
run: gradle wrapper
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
24+
- name: Run publish plugin
25+
run: ./gradlew publishPlugin -i
26+
env:
27+
MAGENTO_PHPSTORM_intellijPublishToken: ${{ secrets.JET_BRAINS_TOKEN }}

CHANGELOG.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
1.0.0
22
=============
33
* Features:
4-
* "Go to GraphQL schema" line marker in the scope of class/interface and method
5-
* "Go to GraphQL resolver class" line marker in the scope of GraphQL schema type arguments
64
* RequireJS mapping support (reference navigation, completion)
7-
* Plugin class methods generation
8-
* Plugin declaration inspection in the scope of a Plugin Class
95
* MFTF support MVP (reference navigation, completion)
10-
* Fixed support of 2020.* versions of IDE's
6+
* Line markers for navigation from a plugin class to a target class
7+
* Line markers for navigation from a GraphQl resolver to schema and vice versa
8+
* Create a plugin for a class public method
119
* Create a New Magento 2 Module action
12-
* Code Inspection: Duplicated Observer Usage in events XML
13-
* Create a Plugin class for a class public method action
14-
* Code Inspection: Warning regarding Cacheable false attribute in default XML
15-
* Create a Preference for a class action
1610
* Create a Block action
17-
* Line markers for navigation from a plugin class to a target class
18-
* Magento 2 Module Project template on the start up
11+
* Create a View Model action
12+
* Create a new Magento 2 module as a separate project
1913
* Create an observer for an event action
20-
* Plugin - Target line markers
21-
* GraphQL resolver inspection in the scope of a PHP Class
14+
* Create a GraphQL resolver action
15+
* Override class by reference action
16+
* Plugin class methods generation
17+
* Code Inspection: Duplicated plugin Usage in di.xml
18+
* Code Inspection: Plugin declaration in the scope of a Plugin Class
19+
* Code Inspection: Warning regarding Cacheable false attribute in default XML
20+
* Code Inspection: GraphQL resolver in the scope of a PHP Class
21+
* Code Inspection: Duplicated Observer Usage in events XML
22+
* Moved plugin configuration from `Settings > Preferences > Languages & Frameworks > PHP > Magento` to
23+
`Settings > Preferences > Languages & Frameworks > PHP > Frameworks > Magento`
24+
* Fixed support of 2020.* versions of IDE's
2225

2326
0.3.0
2427
=============

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,8 @@ sourceSets {
5050
}
5151
}
5252

53-
apply from: "${project.rootDir}/gradle-tasks/staticChecks.gradle"
53+
publishPlugin {
54+
token = System.getenv("MAGENTO_PHPSTORM_intellijPublishToken")
55+
}
56+
57+
apply from: "${project.rootDir}/gradle-tasks/staticChecks.gradle"

resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.mftf.ActionGroupIndex" />
108108
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.mftf.DataIndex" />
109109
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.mftf.PageIndex" />
110-
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.mftf.StepKeyIndex" />
110+
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.mftf.TestNameIndex" />
111111
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.js.RequireJsIndex" />
112112
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.js.MagentoLibJsIndex" />
113113

resources/META-INF/withJsGraphQl.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
18
<idea-plugin>
29
<extensions defaultExtensionNs="com.intellij">
310
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.graphql.GraphQlResolverIndex" />
@@ -9,5 +16,11 @@
916
enabledByDefault="true"
1017
level="ERROR"
1118
implementationClass="com.magento.idea.magento2plugin.inspections.php.GraphQlResolverInspection"/>
19+
<localInspection language="GraphQL" groupPath="GraphQL"
20+
shortName="SchemaResolverInspection" displayName="Schema Resolver must implements ResolverInterface"
21+
groupName="Magento 2"
22+
enabledByDefault="true"
23+
level="ERROR"
24+
implementationClass="com.magento.idea.magento2plugin.inspections.graphqls.SchemaResolverInspection"/>
1225
</extensions>
1326
</idea-plugin>

resources/fileTemplates/code/Magento Crontab Cronjob Registration.xml.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<tr>
4343
<td valign="top"><nobr><font face="verdana" size="-2"><b>${CRONJOB_SCHEDULE}</b></font></nobr></td>
4444
<td width="10">&nbsp;</td>
45-
<td width="100%" valign="top"><font face="verdana" size="-1">The valid fixed cron schedule expression which defines when cronjob is planed to execute</font></td>
45+
<td width="100%" valign="top"><font face="verdana" size="-1">The valid fixed cron schedule expression which defines when cronjob is planned to execute</font></td>
4646
</tr>
4747
<tr>
4848
<td valign="top"><nobr><font face="verdana" size="-2"><b>${CRONJOB_SCHEDULE_CONFIG_PATH}</b></font></nobr></td>

resources/fileTemplates/internal/Magento Php Preference Class.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</tr>
1818
<tr>
1919
<td><font face="verdana" size="-1">
20-
Read more Abbout the preferences in the <a href="https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/di-xml-file.html#abstraction-implementation-mappings">DevDocs</a>.
20+
Read more About the preferences in the <a href="https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/di-xml-file.html#abstraction-implementation-mappings">DevDocs</a>.
2121
</font><br>
2222
</td>
2323
</tr
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html>
8+
<body>
9+
<p>
10+
This inspection detects the invalid resolver interface in schema.graphqls files
11+
</p>
12+
</body>
13+
</html>

resources/magento2/common.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ common.module.dependencies=Module Dependencies
66
common.module.description=Module Description
77
common.ok=OK
88
common.cancel=Cancel
9+
common.error=Error
10+
common.module.target=Target Module
11+
common.area.target=Target Area
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
inspection.plugin.duplicateInSameFile=The plugin name already used in this file. For more details see Inspection Description.
22
inspection.plugin.duplicateInOtherPlaces=The plugin name "{0}" for targeted "{1}" class is already used in the module "{2}" ({3} scope). For more details see Inspection Description.
3+
inspection.graphql.resolver.mustImplement=Class must implements any of the following interfaces: \\Magento\\Framework\\GraphQl\\Query\\ResolverInterface, \\Magento\\Framework\\GraphQl\\Query\\Resolver\\BatchResolverInterface, \\Magento\\Framework\\GraphQl\\Query\\Resolver\\BatchServiceContractResolverInterface
4+
inspection.graphql.resolver.notExist=Resolver class do not exist
5+
inspection.graphql.resolver.fix.family=Implement Resolver interface
6+
inspection.graphql.resolver.fix.title=Select one of the following interface
7+
inspection.plugin.error.nonPublicMethod=You can't declare a plugin for a not public method.
8+
inspection.plugin.error.finalClass=You can't declare a plugin for a final class.
9+
inspection.plugin.error.finalMethod=You can't declare a plugin for a final method.
10+
inspection.plugin.error.staticMethod=You can't declare a plugin for a static method.
11+
inspection.plugin.error.constructMethod=You can't declare a plugin for a __construct method.
12+
inspection.plugin.error.redundantParameter=Redundant parameter
13+
inspection.plugin.error.typeIncompatibility=Possible type incompatibility. Consider changing the parameter according to the target method.
14+
inspection.observer.duplicateInSameFile=The observer name already used in this file. For more details see Inspection Description.
15+
inspection.observer.duplicateInOtherPlaces=The observer name "{0}" for event "{1}" is already used in the module "{2}" ({3} scope). For more details see Inspection Description.
16+
inspection.cache.disabledCache=Cacheable false attribute on the default layout will disable cache site-wide

0 commit comments

Comments
 (0)