Skip to content

Commit 1e1fa29

Browse files
authored
Merge pull request #418 from magento/3.0.1->3.1.0_forwardport
3.0.1 ->3.1.0 forwardport
2 parents b7a280e + a9be730 commit 1e1fa29

File tree

7 files changed

+30
-8
lines changed

7 files changed

+30
-8
lines changed

.github/workflows/gradlepublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Set up JDK 1.8
16+
- name: Set up JDK 11
1717
uses: actions/setup-java@v1
1818
with:
19-
java-version: 1.8
19+
java-version: 11
2020
- name: Gradle wrapper
2121
run: gradle wrapper
2222
- name: Grant execute permission for gradlew

.github/workflows/gradlepublishalpha.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v2
17-
- name: Set up JDK 1.8
17+
- name: Set up JDK 11
1818
uses: actions/setup-java@v1
1919
with:
20-
java-version: 1.8
20+
java-version: 11
2121
- name: Gradle wrapper
2222
run: gradle wrapper
2323
- name: Grant execute permission for gradlew

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
66

77
## 3.1.0
88

9+
## 3.0.1
10+
11+
### Fixed
12+
13+
- Skipped IDEA include tag causing error
14+
- Fixed StringIndexOutOfBoundsException on PluginInspection
15+
916
## 3.0.0
1017

1118
### Added

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This is a PhpStorm IDE plugin for a better Magento 2 development workflow. It is
1717

1818
## Works with
1919

20-
* PhpStorm >= 2020.1.1
21-
* JRE >= 1.8
20+
* PhpStorm >= 2020.3
21+
* JRE >= 11
2222

2323
## Features
2424

resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>
1212

1313
<description><![CDATA[
14-
Magento PhpStorm plugin, created to improve life-work balance while working with Magento 2
14+
This is a PhpStorm IDE plugin for a better Magento 2 development workflow.
1515
]]></description>
1616

1717
<change-notes><![CDATA[

src/com/magento/idea/magento2plugin/inspections/php/PluginInspection.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ private String getTargetMethodName(
323323
final String pluginMethodName = pluginMethod.getName();
324324
final String targetClassMethodName = pluginMethodName
325325
.replace(pluginPrefix, "");
326+
if (targetClassMethodName.isEmpty()) {
327+
return null;
328+
}
326329
final char firstCharOfTargetName = targetClassMethodName.charAt(0);
327330
final int charType = Character.getType(firstCharOfTargetName);
328331
if (charType == Character.LOWERCASE_LETTER) {

src/com/magento/idea/magento2plugin/stubs/indexes/xml/PhpClassNameIndex.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
import com.jetbrains.php.lang.PhpLangUtil;
2424
import com.magento.idea.magento2plugin.project.Settings;
2525
import com.magento.idea.magento2plugin.util.RegExUtil;
26+
import com.magento.idea.magento2plugin.util.xml.XmlPsiTreeUtil;
2627
import gnu.trove.THashMap;
28+
import java.util.List;
2729
import java.util.Map;
2830
import org.jetbrains.annotations.NotNull;
2931

@@ -65,7 +67,7 @@ public DataIndexer<String, Void, FileContent> getIndexer() {
6567
};
6668
}
6769

68-
private void fillMap(final XmlTag parentTag, final Map<String, Void> resultMap) {
70+
private void fillMap(final XmlTag parentTag, final Map<String, Void> resultMap) { //NOPMD
6971
for (final XmlTag childTag: parentTag.getSubTags()) {
7072
for (final XmlAttribute xmlAttribute: childTag.getAttributes()) {
7173
final String xmlAttributeValue = xmlAttribute.getValue();
@@ -79,6 +81,16 @@ private void fillMap(final XmlTag parentTag, final Map<String, Void> resultMap)
7981
if (XmlIncludeHandler.isXInclude(childTag)) {
8082
return;
8183
}
84+
85+
//skipping IDEA include tag
86+
final List<XmlTag> ideaIncludeTags = XmlPsiTreeUtil.findSubTagsOfParent(
87+
childTag,
88+
"xi:include"
89+
);
90+
if (!ideaIncludeTags.isEmpty()) {
91+
return;
92+
}
93+
8294
final XmlTagValue childTagValue = childTag.getValue();
8395
final String tagValue = childTagValue.getTrimmedText();
8496
if (!tagValue.isEmpty() && tagValue.matches(CLASS_NAME_PATTERN)) {

0 commit comments

Comments
 (0)