Skip to content

Commit 49549ad

Browse files
authored
Merge branch '5.2.0-develop' into 5.1.0-develop
2 parents b641d04 + 8f8b6fc commit 49549ad

File tree

14 files changed

+68
-77
lines changed

14 files changed

+68
-77
lines changed

.github/workflows/gradle.yml

+28-20
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
16-
- name: Set up JDK 11
17-
uses: actions/setup-java@v1
15+
- uses: actions/checkout@v3
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v3
1818
with:
19-
java-version: 11
20-
- uses: actions/cache@v2
19+
java-version: 17
20+
distribution: 'temurin'
21+
cache: gradle
22+
- uses: actions/cache@v3
2123
with:
2224
path: |
2325
~/.gradle/caches
@@ -36,12 +38,14 @@ jobs:
3638
runs-on: windows-latest
3739

3840
steps:
39-
- uses: actions/checkout@v2
40-
- name: Set up JDK 11
41-
uses: actions/setup-java@v1
41+
- uses: actions/checkout@v3
42+
- name: Set up JDK 17
43+
uses: actions/setup-java@v3
4244
with:
43-
java-version: 11
44-
- uses: actions/cache@v2
45+
java-version: 17
46+
distribution: 'temurin'
47+
cache: gradle
48+
- uses: actions/cache@v3
4549
with:
4650
path: |
4751
~/.gradle/caches
@@ -60,12 +64,14 @@ jobs:
6064
runs-on: macos-latest
6165

6266
steps:
63-
- uses: actions/checkout@v2
64-
- name: Set up JDK 11
65-
uses: actions/setup-java@v1
67+
- uses: actions/checkout@v3
68+
- name: Set up JDK 17
69+
uses: actions/setup-java@v3
6670
with:
67-
java-version: 11
68-
- uses: actions/cache@v2
71+
java-version: 17
72+
distribution: 'temurin'
73+
cache: gradle
74+
- uses: actions/cache@v3
6975
with:
7076
path: |
7177
~/.gradle/caches
@@ -84,12 +90,14 @@ jobs:
8490
runs-on: ubuntu-latest
8591

8692
steps:
87-
- uses: actions/checkout@v2
88-
- name: Set up JDK 11
89-
uses: actions/setup-java@v1
93+
- uses: actions/checkout@v3
94+
- name: Set up JDK 17
95+
uses: actions/setup-java@v3
9096
with:
91-
java-version: 11
92-
- uses: actions/cache@v2
97+
java-version: 17
98+
distribution: 'temurin'
99+
cache: gradle
100+
- uses: actions/cache@v3
93101
with:
94102
path: |
95103
~/.gradle/caches

.github/workflows/gradlepublish.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: Set up JDK 11
17-
uses: actions/setup-java@v1
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v3
1818
with:
19-
java-version: 11
19+
java-version: 17
20+
distribution: 'temurin'
21+
cache: gradle
2022
- name: Gradle wrapper
2123
run: gradle wrapper
2224
- name: Grant execute permission for gradlew

.github/workflows/gradlepublishalpha.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 11
18-
uses: actions/setup-java@v1
16+
- uses: actions/checkout@v3
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v3
1919
with:
20-
java-version: 11
20+
java-version: 17
21+
distribution: 'temurin'
22+
cache: gradle
2123
- name: Gradle wrapper
2224
run: gradle wrapper
2325
- name: Grant execute permission for gradlew

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
66

7+
## 5.2.0
8+
79
## 5.1.0
810

911
### Fixed

README.md

+3-3
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

@@ -42,7 +42,7 @@
4242

4343
1. Check out this repository
4444
1. Open a folder with the project in the IntelliJ Ultimate using the `open` action button.
45-
1. Make sure that you on the latest develop branch (e.g `5.1.0-develop`)
45+
1. Make sure that you on the latest develop branch (e.g `5.2.0-develop`)
4646
1. Right-click on the `build.gradle` file, choose "Import Gradle project" (if this is not exist look for "Build module '<root folder name>'") (you need to have Gradle plugin installed)
4747
1. Check if the right SDK version is used for the project.
4848
- Current Java version for the project is **java 11**, so you should additionally download **SDK 11** and choose it in the module settings: `Right click by the project root > Open Module Settings > Project Settings > Project > Project SDK`

build.gradle

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

66
plugins {
7-
id 'org.jetbrains.intellij' version '1.11.0'
7+
id 'org.jetbrains.intellij' version '1.13.3'
88
id 'checkstyle'
99
id 'pmd'
1010
id 'org.jetbrains.changelog' version '2.0.0'
@@ -15,17 +15,17 @@ repositories {
1515
}
1616

1717
group 'com.magento.idea'
18-
version '5.1.0'
18+
version '5.2.0'
1919

2020
apply plugin: 'org.jetbrains.intellij'
2121
apply plugin: 'java'
2222
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
]

gradle-tasks/staticChecks.gradle

+3-14
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,20 @@ checkstyle {
1313
toolVersion = "8.31"
1414
ignoreFailures = false
1515
maxWarnings = 0
16-
configFile rootProject.file("gradle-tasks/checkstyle/checkstyle.xml")
16+
configFile rootProject.file("${rootDir}/gradle-tasks/checkstyle/checkstyle.xml")
1717
}
1818

1919
pmd {
2020
toolVersion = "6.21.0"
2121
consoleOutput = true
22-
ruleSets = [
23-
rootProject.file("gradle-tasks/pmd/ruleset.xml")
24-
]
22+
ruleSetFiles = files("${rootDir}/gradle-tasks/pmd/ruleset.xml")
23+
ruleSets = []
2524
}
2625

2726
tasks.withType(Checkstyle) {
2827
// Specify all files that should be checked
2928
classpath = files()
3029
source "${project.rootDir}"
31-
32-
reports {
33-
xml.enabled false
34-
html.enabled true
35-
}
3630
}
3731

3832
// Execute Checkstyle on all files
@@ -49,11 +43,6 @@ tasks.withType(Pmd) {
4943
// Specify all files that should be checked
5044
classpath = files()
5145
source "${project.rootDir}"
52-
53-
reports {
54-
xml.enabled false
55-
html.enabled true
56-
}
5746
}
5847

5948
// Execute Checkstyle on all files

resources/META-INF/plugin.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<idea-plugin require-restart="true">
88
<id>com.magento.idea.magento2plugin</id>
99
<name>Magento PhpStorm</name>
10-
<version>5.1.0</version>
10+
<version>5.2.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="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>

resources/fileTemplates/internal/Magento CLI Command Class.php.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<font face="verdana" size="-1">
1313
Magento enables your component to add commands to our Symfony-like command-line interface (CLI).
1414
<a href="https://devdocs.magento.com/guides/v2.3/extension-dev-guide/cli-cmds/cli-howto.html">
15-
Read more</a> about Magneto CLI commands.
15+
Read more</a> about Magento CLI commands.
1616
</font>
1717
</td>
1818
</tr>

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;

tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ protected void assertHasNoLinemarkerWithTooltipAndIcon(
5959
= "Failed that documents not contains linemarker with the tooltip `%s`";
6060

6161
final List<LineMarkerInfo<?>> lineMarkers = getDocumentLineMarkers();
62-
assertNotEmpty(lineMarkers);
6362
for (final LineMarkerInfo lineMarkerInfo: lineMarkers) {
6463
final String lineMarkerTooltip = lineMarkerInfo.getLineMarkerTooltip();
6564
final Icon lineMarkerIcon = lineMarkerInfo.getIcon();

tests/com/magento/idea/magento2plugin/linemarker/graphqls/GraphQlResolverClassLinemarkerRegistrarTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class GraphQlResolverClassLinemarkerRegistrarTest extends LinemarkerFixtu
1515
public void testWithValidSchemaResolver() {
1616
myFixture.configureByFile(this.getFixturePath("schema.graphqls", "graphqls"));
1717

18-
assertHasLinemarkerWithTooltipAndIcon("Navigate to class", "nodes/class.svg");
18+
assertHasLinemarkerWithTooltipAndIcon("Navigate to class", "Class");
1919
}
2020
}

0 commit comments

Comments
 (0)