Skip to content

Commit e0125c9

Browse files
authored
Merge pull request #1471 from magento/5.1.0-compatibility-fixes
5.1.0 - additional compatibility fixes
2 parents da42f41 + 5450801 commit e0125c9

File tree

9 files changed

+31
-42
lines changed

9 files changed

+31
-42
lines changed

.github/workflows/gradle.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: Set up JDK 11
16+
- name: Set up JDK 17
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: 11
19+
java-version: 17
2020
distribution: 'temurin'
2121
cache: gradle
2222
- uses: actions/cache@v3
@@ -39,10 +39,10 @@ jobs:
3939

4040
steps:
4141
- uses: actions/checkout@v3
42-
- name: Set up JDK 11
42+
- name: Set up JDK 17
4343
uses: actions/setup-java@v3
4444
with:
45-
java-version: 11
45+
java-version: 17
4646
distribution: 'temurin'
4747
cache: gradle
4848
- uses: actions/cache@v3
@@ -65,10 +65,10 @@ jobs:
6565

6666
steps:
6767
- uses: actions/checkout@v3
68-
- name: Set up JDK 11
68+
- name: Set up JDK 17
6969
uses: actions/setup-java@v3
7070
with:
71-
java-version: 11
71+
java-version: 17
7272
distribution: 'temurin'
7373
cache: gradle
7474
- uses: actions/cache@v3
@@ -91,10 +91,10 @@ jobs:
9191

9292
steps:
9393
- uses: actions/checkout@v3
94-
- name: Set up JDK 11
94+
- name: Set up JDK 17
9595
uses: actions/setup-java@v3
9696
with:
97-
java-version: 11
97+
java-version: 17
9898
distribution: 'temurin'
9999
cache: gradle
100100
- uses: actions/cache@v3

.github/workflows/gradlepublish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: Set up JDK 11
16+
- name: Set up JDK 17
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: 11
19+
java-version: 17
2020
distribution: 'temurin'
2121
cache: gradle
2222
- name: Gradle wrapper

.github/workflows/gradlepublishalpha.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v3
17-
- name: Set up JDK 11
17+
- name: Set up JDK 17
1818
uses: actions/setup-java@v3
1919
with:
20-
java-version: 11
20+
java-version: 17
2121
distribution: 'temurin'
2222
cache: gradle
2323
- name: Gradle wrapper

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
## Works with
2323

24-
* PhpStorm >= 2021.2.1
25-
* JRE >= 11
24+
* PhpStorm >= 2023.1
25+
* JRE >= 17
2626

2727
## Features
2828

build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
plugins {
7-
id 'org.jetbrains.intellij' version '1.13.2'
7+
id 'org.jetbrains.intellij' version '1.13.3'
88
id 'checkstyle'
99
id 'pmd'
1010
id 'org.jetbrains.changelog' version '2.0.0'
@@ -23,9 +23,9 @@ apply plugin: 'idea'
2323
apply plugin: 'groovy'
2424
apply plugin: 'org.jetbrains.changelog'
2525

26-
def phpPluginVersion = System.getProperty("phpPluginVersion", "222.3739.45")
27-
def ideaVersion = System.getProperty("ideaVersion", "2022.2.1")
28-
def javaVersion = 11
26+
def phpPluginVersion = System.getProperty("phpPluginVersion", "231.8109.199")
27+
def ideaVersion = System.getProperty("ideaVersion", "2023.1")
28+
def javaVersion = 17
2929

3030
sourceCompatibility = javaVersion
3131
targetCompatibility = javaVersion
@@ -39,9 +39,9 @@ intellij {
3939
'yaml',
4040
'java-i18n',
4141
'properties',
42-
'CSS',
43-
'JavaScriptLanguage',
44-
'com.intellij.lang.jsgraphql:3.2.1',
42+
'com.intellij.css',
43+
'JavaScript',
44+
'com.intellij.lang.jsgraphql:3.4.0',
4545
'platform-images',
4646
'copyright'
4747
]

resources/META-INF/plugin.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -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="222.3739.54"/>
27+
<idea-version since-build="231.8109.175"/>
2828

2929
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
3030
on how to target different products -->
@@ -33,6 +33,7 @@
3333
-->
3434
<depends>com.jetbrains.php</depends>
3535
<depends>JavaScript</depends>
36+
<depends>com.intellij.css</depends>
3637
<depends>com.intellij.modules.platform</depends>
3738
<depends>com.intellij.platform.images</depends>
3839
<depends>com.intellij.copyright</depends>

src/com/magento/idea/magento2plugin/actions/groups/NewEavAttributeGroup.java

+3-9
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import com.intellij.ide.actions.NonTrivialActionGroup;
99
import com.intellij.openapi.util.IconLoader;
1010
import com.magento.idea.magento2plugin.MagentoIcons;
11-
import javax.swing.Icon;
12-
import org.jetbrains.annotations.NotNull;
1311

1412
public class NewEavAttributeGroup extends NonTrivialActionGroup {
1513

@@ -19,12 +17,8 @@ public class NewEavAttributeGroup extends NonTrivialActionGroup {
1917
public NewEavAttributeGroup() {
2018
super();
2119

22-
this.getTemplatePresentation().setIcon(new IconLoader.LazyIcon() {
23-
@NotNull
24-
@Override
25-
protected Icon compute() {
26-
return MagentoIcons.MODULE;
27-
}
28-
});
20+
this.getTemplatePresentation().setIcon(
21+
IconLoader.createLazy(() -> MagentoIcons.MODULE)
22+
);
2923
}
3024
}

src/com/magento/idea/magento2plugin/actions/groups/NewModuleFileGroup.java

+4-10
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.intellij.openapi.actionSystem.AnActionEvent;
1010
import com.intellij.openapi.actionSystem.PlatformDataKeys;
1111
import com.intellij.openapi.project.Project;
12-
import com.intellij.openapi.util.IconLoader.LazyIcon;
12+
import com.intellij.openapi.util.IconLoader;
1313
import com.intellij.psi.PsiDirectory;
1414
import com.intellij.psi.PsiElement;
1515
import com.magento.idea.magento2plugin.MagentoIcons;
@@ -18,8 +18,6 @@
1818
import com.magento.idea.magento2plugin.project.Settings;
1919
import com.magento.idea.magento2plugin.util.magento.GetMagentoModuleUtil;
2020
import com.magento.idea.magento2plugin.util.magento.GetModuleNameByDirectoryUtil;
21-
import javax.swing.Icon;
22-
import org.jetbrains.annotations.NotNull;
2321

2422
public class NewModuleFileGroup extends NonTrivialActionGroup {
2523

@@ -29,13 +27,9 @@ public class NewModuleFileGroup extends NonTrivialActionGroup {
2927
public NewModuleFileGroup() {
3028
super();
3129

32-
this.getTemplatePresentation().setIcon(new LazyIcon() {
33-
@NotNull
34-
@Override
35-
protected Icon compute() {
36-
return MagentoIcons.MODULE;
37-
}
38-
});
30+
this.getTemplatePresentation().setIcon(
31+
IconLoader.createLazy(() -> MagentoIcons.MODULE)
32+
);
3933
}
4034

4135
@Override

src/com/magento/idea/magento2plugin/init/ConfigurationManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public void actionPerformed(@NotNull AnActionEvent e) {
184184
}
185185

186186
private static boolean isInIncludePath(@NotNull VirtualFile fileToCheck, @NotNull Project project) {
187-
List<VirtualFile> includePaths = PhpIncludePathManager.getInstance(project).getRoots();
187+
List<VirtualFile> includePaths = PhpIncludePathManager.getInstance(project).getAllIncludedRoots();
188188
Iterator iterator = includePaths.iterator();
189189

190190
VirtualFile file;

0 commit comments

Comments
 (0)