Skip to content

Commit 8ab114d

Browse files
Merge branch '4.1.0-develop' of github.com:magento/magento2-phpstorm-plugin into uct-project-run-configuration-feature
2 parents 8203f15 + 84913ca commit 8ab114d

File tree

9 files changed

+96
-26
lines changed

9 files changed

+96
-26
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
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, 4.0.0-develop ]
8+
branches: [ master, 4.1.0-develop ]
99

1010
jobs:
1111
build-linux:

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,39 @@ 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+
## 4.1.0
8+
79
## 4.0.0
810

11+
### Added
12+
13+
- Added XML file header include code template in [#615](https://github.com/magento/magento2-phpstorm-plugin/pull/615)
14+
- Added Web API generation for the Magento Entity Creator in [#597](https://github.com/magento/magento2-phpstorm-plugin/pull/597) and [#607](https://github.com/magento/magento2-phpstorm-plugin/pull/607)
15+
- Added DI XML plugin type attribute inspections in [#588](https://github.com/magento/magento2-phpstorm-plugin/pull/588)
16+
- Added Web API interface for service (PHP class) generation in [#586](https://github.com/magento/magento2-phpstorm-plugin/pull/586)
17+
- Added DI XML type tag attributes inspections that related to the PHP/Magento types in [#582](https://github.com/magento/magento2-phpstorm-plugin/pull/582)
18+
- Added DI XML preference tag attributes inspections in [#578](https://github.com/magento/magento2-phpstorm-plugin/pull/578)
19+
- Added Web API XML service tag attributes inspections in [#577](https://github.com/magento/magento2-phpstorm-plugin/pull/577)
20+
- Added an error handler to help user with a new bug issue creation on the GitHub side in [#552](https://github.com/magento/magento2-phpstorm-plugin/pull/552) and [#593](https://github.com/magento/magento2-phpstorm-plugin/pull/593)
21+
- Added Web API declaration generation in [#548](https://github.com/magento/magento2-phpstorm-plugin/pull/548) and [#595](https://github.com/magento/magento2-phpstorm-plugin/pull/595)
22+
- Added JS and CSS support for Copy Magento Path action in [#536](https://github.com/magento/magento2-phpstorm-plugin/pull/536)
23+
24+
### Changed
25+
26+
- Changed the content of the generated plugin class in [#612](https://github.com/magento/magento2-phpstorm-plugin/pull/612)
27+
- Changed using of hardcoded entity id value into the constant in all files generated by the Entity Creator in [#606](https://github.com/magento/magento2-phpstorm-plugin/pull/606)
28+
29+
### Fixed
30+
31+
- Fixed a casting exception in the XML index in [#617](https://github.com/magento/magento2-phpstorm-plugin/pull/617)
32+
- Fixed a bug with plugin generation for complex non-primitive types in [#609](https://github.com/magento/magento2-phpstorm-plugin/pull/609)
33+
- Fixed a bug with the namespace generation in a generated controller in [#571](https://github.com/magento/magento2-phpstorm-plugin/pull/571)
34+
- Fixed a bug with directory validation for the generation dialogues in [#565](https://github.com/magento/magento2-phpstorm-plugin/pull/565)
35+
- Fixed wrong entity data mapper file template position in [#549](https://github.com/magento/magento2-phpstorm-plugin/pull/549)
36+
- Fixed incorrect data saving into table model within editing a table in [#544](https://github.com/magento/magento2-phpstorm-plugin/pull/544)
37+
- Fixed an error when plugin or observer name is not set in [#533](https://github.com/magento/magento2-phpstorm-plugin/pull/533)
38+
- Fixed incorrect duplication warning for disabled plugin in di.xml in [#529](https://github.com/magento/magento2-phpstorm-plugin/pull/529)
39+
940
## 3.2.2
1041

1142
### Fixed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
## Works with
2424

25-
* PhpStorm >= 2021.1
25+
* PhpStorm >= 2021.2.1
2626
* JRE >= 11
2727

2828
## Features
@@ -43,7 +43,7 @@
4343

4444
1. Check out this repository
4545
1. Open a folder with the project in the IntelliJ Ultimate using the `open` action button.
46-
1. Make sure that you on the latest develop branch (e.g `4.0.0-develop`)
46+
1. Make sure that you on the latest develop branch (e.g `4.1.0-develop`)
4747
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)
4848
1. Check if the right SDK version is used for the project.
4949
- 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

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

66
plugins {
7-
id 'org.jetbrains.intellij' version '0.7.2'
7+
id 'org.jetbrains.intellij' version '1.1.4'
88
id 'checkstyle'
99
id 'pmd'
10-
id 'org.jetbrains.changelog' version '0.6.2'
10+
id 'org.jetbrains.changelog' version '1.2.1'
1111
}
1212

1313
repositories {
1414
mavenCentral()
1515
}
1616

1717
group 'com.magento.idea'
18-
version '4.0.0'
18+
version '4.1.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", "211.6693.111")
27-
def ideaVersion = System.getProperty("ideaVersion", "2021.1")
26+
def phpPluginVersion = System.getProperty("phpPluginVersion", "212.5080.71")
27+
def ideaVersion = System.getProperty("ideaVersion", "2021.2.1")
2828
def javaVersion = 11
2929

3030
sourceCompatibility = javaVersion
3131
targetCompatibility = javaVersion
3232

3333
intellij {
34-
version ideaVersion
35-
type 'IU'
36-
pluginName 'com.magento.idea.magento2plugin'
34+
version = ideaVersion
35+
type = 'IU'
36+
pluginName = 'com.magento.idea.magento2plugin'
3737
plugins = [
3838
"com.jetbrains.php:$phpPluginVersion",
3939
'yaml',
4040
'java-i18n',
4141
'properties',
4242
'CSS',
4343
'JavaScriptLanguage',
44-
'com.intellij.lang.jsgraphql:2.9.1',
44+
'com.intellij.lang.jsgraphql:3.0.0',
4545
'platform-images',
4646
'copyright'
4747
]
48-
updateSinceUntilBuild false
49-
sameSinceUntilBuild false
50-
downloadSources !Boolean.valueOf(System.getenv('CI'))
51-
sandboxDirectory "${project.rootDir}/.idea-sandbox"
48+
updateSinceUntilBuild = false
49+
sameSinceUntilBuild = false
50+
downloadSources = !Boolean.valueOf(System.getenv('CI'))
51+
sandboxDir = "${project.rootDir}/.idea-sandbox"
5252

5353
patchPluginXml {
54-
changeNotes({ changelog.getLatest().toHTML() })
54+
changeNotes = provider { changelog.getLatest().toHTML() }
5555
}
5656
}
5757

@@ -85,7 +85,7 @@ apply from: "${project.rootDir}/gradle-tasks/staticChecks.gradle"
8585
changelog {
8686
version = "${project.version}"
8787
path = "${project.projectDir}/CHANGELOG.md"
88-
header = { "[${project.version}] - ${getDate()}" }
88+
header = provider { "[${project.version}] - ${getDate()}" }
8989
headerParserRegex = ~/(\d+\.)?(\d+\.)?(\*|\d+)/
9090
itemPrefix = "-"
9191
keepUnreleasedSection = true

resources/META-INF/plugin.xml

Lines changed: 2 additions & 2 deletions
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>4.0.0</version>
10+
<version>4.1.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="211.6693.111"/>
27+
<idea-version since-build="212.5080.71"/>
2828

2929
<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
3030
on how to target different products -->
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.actions.generation.generator.util;
7+
8+
import com.intellij.openapi.project.Project;
9+
import com.intellij.psi.codeStyle.CodeStyleSettings;
10+
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
11+
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
12+
import org.jetbrains.annotations.NotNull;
13+
14+
public final class DefaultCodeStyleSettingsAdjustmentsUtil {
15+
16+
private DefaultCodeStyleSettingsAdjustmentsUtil() {
17+
}
18+
19+
/**
20+
* Adjust default code style settings for project.
21+
*
22+
* @param project Project
23+
*/
24+
public static void execute(final @NotNull Project project) {
25+
final CodeStyleSettings codeStyleSettings = CodeStyleSettingsManager
26+
.getInstance(project)
27+
.getTemporarySettings();
28+
29+
if (codeStyleSettings == null) {
30+
return;
31+
}
32+
final CommonCodeStyleSettings commonPhpSettings = codeStyleSettings
33+
.getCommonSettings("PHP");
34+
// This value has changed to TRUE by default in the latest releases.
35+
// This is necessary to return the value by default to the previous one.
36+
commonPhpSettings.ALIGN_MULTILINE_PARAMETERS = false;
37+
}
38+
}

testData/actions/generation/generator/PluginClassGenerator/generatePluginClassFile/TestPlugin.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
43
namespace Foo\Bar\Plugin;
54

6-
75
use Foo\Bar\Service\SimpleService;
86

97
class TestPlugin

tests/com/magento/idea/magento2plugin/actions/generation/generator/BaseGeneratorTestCase.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.intellij.psi.PsiFile;
1010
import com.intellij.testFramework.LightPlatformTestCase;
1111
import com.magento.idea.magento2plugin.BaseProjectTestCase;
12+
import com.magento.idea.magento2plugin.actions.generation.generator.util.DefaultCodeStyleSettingsAdjustmentsUtil;
1213
import com.magento.idea.magento2plugin.magento.packages.File;
1314
import com.magento.idea.magento2plugin.project.util.GetProjectBasePath;
1415
import org.junit.After;
@@ -25,6 +26,8 @@ public abstract class BaseGeneratorTestCase extends BaseProjectTestCase {
2526
protected void setUp() throws Exception {
2627
super.setUp();
2728
myFixture.setTestDataPath(TEST_DATA_FOLDER_PATH);
29+
// Reset changed default code style settings to the previous default settings.
30+
DefaultCodeStyleSettingsAdjustmentsUtil.execute(myFixture.getProject());
2831
}
2932

3033
@Override

tests/com/magento/idea/magento2plugin/linemarker/php/WebApiLinemarkerRegistrarTest.java

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

66
package com.magento.idea.magento2plugin.linemarker.php;
77

8-
import com.intellij.openapi.application.impl.ApplicationInfoImpl;
8+
import com.intellij.openapi.application.ex.ApplicationManagerEx;
99
import com.magento.idea.magento2plugin.MagentoIcons;
1010
import com.magento.idea.magento2plugin.linemarker.LinemarkerFixtureTestCase;
1111

@@ -32,8 +32,8 @@ public void testWebApiServiceShouldHaveLinemarker() {
3232
// work around for issue caused by
3333
// com.magento.idea.magento2plugin.linemarker.xml.LineMarkerXmlTagDecorator
3434
// in com.intellij.psi.impl.smartPointers.SmartPsiElementPointerImpl.createElementInfo
35-
final boolean isInStressTestCurrent = ApplicationInfoImpl.isInStressTest();
36-
ApplicationInfoImpl.setInStressTest(true);
35+
final boolean isInStressTestCurrent = ApplicationManagerEx.isInStressTest();
36+
ApplicationManagerEx.setInStressTest(true);
3737

3838
myFixture.configureByFile(this.getFixturePath("TestService.php", "php"));
3939

@@ -54,7 +54,7 @@ public void testWebApiServiceShouldHaveLinemarker() {
5454
);
5555

5656
//restore default value
57-
ApplicationInfoImpl.setInStressTest(isInStressTestCurrent);
57+
ApplicationManagerEx.setInStressTest(isInStressTestCurrent);
5858
}
5959

6060
/**

0 commit comments

Comments
 (0)