Skip to content

Commit b6c0342

Browse files
author
Vitaliy Boyko
committed
Merge branch 'mainline-eav-attr-code-genearators' of github.com:magento/magento2-phpstorm-plugin into customer-aev-attribute-generation
2 parents db4da15 + fcecdd5 commit b6c0342

File tree

613 files changed

+24687
-2607
lines changed

Some content is hidden

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

613 files changed

+24687
-2607
lines changed

.github/workflows/gradle.yml

+1-1
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.3.0-develop ]
99

1010
jobs:
1111
build-linux:

CHANGELOG.md

+140
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,148 @@ 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.3.0
8+
9+
## 4.2.3
10+
11+
### Fixed
12+
13+
- Fixed a simple-json library is absent in the distribution in [#951](https://github.com/magento/magento2-phpstorm-plugin/pull/951)
14+
15+
## 4.2.2
16+
17+
### Added
18+
19+
- Added custom search scope to exclude test files from search [#read-more](https://github.com/magento/magento2-phpstorm-plugin/wiki/4.2.2-Release)
20+
- Added the ability to open all plugins in the Find Tool Window [#read-more](https://github.com/magento/magento2-phpstorm-plugin/wiki/4.2.2-Release)
21+
- Added uiComponent registration syntax highlighting as JSON [#read-more](https://github.com/magento/magento2-phpstorm-plugin/wiki/4.2.2-Release)
22+
- Added new Magento version support (2.4.4-beta4) for the UCT feature in [#922](https://github.com/magento/magento2-phpstorm-plugin/pull/922)
23+
24+
### Changed
25+
26+
- Eliminated com.google.gson.JsonParser#parse usage in [#928](https://github.com/magento/magento2-phpstorm-plugin/pull/928)
27+
- Eliminated LineMarkerXmlTagDecorator#checkDelete usage in [#910](https://github.com/magento/magento2-phpstorm-plugin/pull/910)
28+
- Eliminated LineMarkerXmlTagDecorator#checkAdd usage in [#909](https://github.com/magento/magento2-phpstorm-plugin/pull/909)
29+
- Enhanced errors showing for the new Magento 2 UI Component Form dialog window in [#892](https://github.com/magento/magento2-phpstorm-plugin/pull/892)
30+
- Enhanced errors showing for the new Magento 2 UI Component Grid dialog window in [#891](https://github.com/magento/magento2-phpstorm-plugin/pull/891)
31+
- Enhanced errors showing for the new Magento 2 DB Schema XML dialog window in [#890](https://github.com/magento/magento2-phpstorm-plugin/pull/890)
32+
- Enhanced errors showing for the new Magento 2 Message Queue dialog window in [#889](https://github.com/magento/magento2-phpstorm-plugin/pull/889)
33+
- Enhanced errors showing for the new Magento 2 Data Model dialog window in [#888](https://github.com/magento/magento2-phpstorm-plugin/pull/888)
34+
- Enhanced errors showing for the new Magento 2 Models dialog window in [#887](https://github.com/magento/magento2-phpstorm-plugin/pull/887)
35+
- Enhanced errors showing for the new Magento 2 Email Template dialog window in [#886](https://github.com/magento/magento2-phpstorm-plugin/pull/886)
36+
- Enhanced errors showing for the new Magento 2 CLI Command dialog window in [#885](https://github.com/magento/magento2-phpstorm-plugin/pull/885)
37+
- Enhanced errors showing for the new Magento 2 GraphQl Resolver dialog window in [#884](https://github.com/magento/magento2-phpstorm-plugin/pull/884)
38+
- Enhanced errors showing for the new Magento 2 View Model dialog window in [#883](https://github.com/magento/magento2-phpstorm-plugin/pull/883)
39+
- Enhanced errors showing for the new Magento 2 Cron Group dialog window in [#882](https://github.com/magento/magento2-phpstorm-plugin/pull/882)
40+
- Enhanced errors showing for the new Magento 2 Cron Job dialog window in [#881](https://github.com/magento/magento2-phpstorm-plugin/pull/881)
41+
- Enhanced errors showing for the new Magento 2 Controller dialog window in [#880](https://github.com/magento/magento2-phpstorm-plugin/pull/880)
42+
- Enhanced errors showing for the new Magento 2 Block dialog window in [#865](https://github.com/magento/magento2-phpstorm-plugin/pull/865)
43+
44+
### Fixed
45+
46+
- Fixed overriding layouts and templates allows to select an incompatible theme in [#930](https://github.com/magento/magento2-phpstorm-plugin/pull/930)
47+
- Fixed observer action visibility in [#936](https://github.com/magento/magento2-phpstorm-plugin/pull/936)
48+
- Fixed general exception while accessing phpIndex.getAnyByFQN(classFQN) in [#934](https://github.com/magento/magento2-phpstorm-plugin/pull/934)
49+
- Fixed ClassCastException for the GraphQlResolverIndex.getGraphQLUsages in [#927](https://github.com/magento/magento2-phpstorm-plugin/pull/927)
50+
- Fixed plugin inspection does not work correctly in [#902](https://github.com/magento/magento2-phpstorm-plugin/pull/902)
51+
- Fixed module name declaration inspection flags valid code in [#898](https://github.com/magento/magento2-phpstorm-plugin/pull/898)
52+
- Fixed ClassCastException: PsiPlainTextFileImpl cannot be cast to class XmlFile in WebApiTypeIndex in [#897](https://github.com/magento/magento2-phpstorm-plugin/pull/897)
53+
- Fixed IndexNotReadyException while opening a context menu in [#896](https://github.com/magento/magento2-phpstorm-plugin/pull/896)
54+
- Fixed IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern in [#894](https://github.com/magento/magento2-phpstorm-plugin/pull/894)
55+
- Fixed Throwable: AWT events are not allowed inside write action (UI Form) in [#893](https://github.com/magento/magento2-phpstorm-plugin/pull/893)
56+
- Fixed Slow operations are prohibited on EDT when calling update method on the CreateAPluginAction in [#862](https://github.com/magento/magento2-phpstorm-plugin/pull/862)
57+
- Fixed Throwable: when an IOException is thrown during new plugin generation in [#860](https://github.com/magento/magento2-phpstorm-plugin/pull/860)
58+
- Fixed IndexOutOfBoundsException in case when entered no fields during ui form generation in [#859](https://github.com/magento/magento2-phpstorm-plugin/pull/859)
59+
- Fixed NullPointerException when opening new cron job dialog for an invalid Magento 2 module in [#856](https://github.com/magento/magento2-phpstorm-plugin/pull/856)
60+
- Fixed NoSuchElementException when creating new controller in [#844](https://github.com/magento/magento2-phpstorm-plugin/pull/844)
61+
- Fixed Message Queue Connection does not match Naming Conventions in [#854](https://github.com/magento/magento2-phpstorm-plugin/pull/854)
62+
- Fixed StringIndexOutOfBoundsException during UCT inspection via action execution in [852](https://github.com/magento/magento2-phpstorm-plugin/pull/852)
63+
- Fixed NullPointerException in the PluginDeclarationInspection.fetchModuleNamesWhereSamePluginNameUsed (calling toString on null) in [#849](https://github.com/magento/magento2-phpstorm-plugin/pull/849)
64+
65+
## 4.2.1
66+
67+
### Fixed
68+
69+
- Fixed ArrayIndexOutOfBoundsException when used Copy Path/Reference action on the requirejs-config.js file in [#808](https://github.com/magento/magento2-phpstorm-plugin/pull/808)
70+
- Fixed dialog disposition issue in [#811](https://github.com/magento/magento2-phpstorm-plugin/pull/811)
71+
- Fixed stack overflow error for line-marker providers in [#813](https://github.com/magento/magento2-phpstorm-plugin/pull/813)
72+
- Fixed stub ids not found for key in index in [#814](https://github.com/magento/magento2-phpstorm-plugin/pull/814)
73+
- Fixed failed to build require-js index in [815](https://github.com/magento/magento2-phpstorm-plugin/pull/815)
74+
- Fixed empty psi elements in the plugin inspections in [#816](https://github.com/magento/magento2-phpstorm-plugin/pull/816)
75+
- Fixed empty psi element in module xml inspection in [#817](https://github.com/magento/magento2-phpstorm-plugin/pull/817)
76+
- Fixed NullPointerException for the firstSortOrder.compareTo in [#818](https://github.com/magento/magento2-phpstorm-plugin/pull/818)
77+
- Fixed invalid column types provided exception during db_schema.xml file generation in [#819](https://github.com/magento/magento2-phpstorm-plugin/pull/819)
78+
- Fixed method designed for fully qualified names only in [#830](https://github.com/magento/magento2-phpstorm-plugin/pull/830)
79+
- Fixed NoClassDefFoundError for com.intellij.lang.jsgraphql.GraphQLIcons in [#850](https://github.com/magento/magento2-phpstorm-plugin/pull/850)
80+
81+
## 4.2.0
82+
83+
### Added
84+
85+
- Extending of the built-in Upgrade Compatibility Tool [#read-more](https://github.com/magento/magento2-phpstorm-plugin/wiki/4.2.0-Release)
86+
87+
### Changed
88+
89+
- Enhanced Magento 2 version resolving in [#747](https://github.com/magento/magento2-phpstorm-plugin/pull/747), [#751](https://github.com/magento/magento2-phpstorm-plugin/pull/751), [#777](https://github.com/magento/magento2-phpstorm-plugin/pull/777)
90+
91+
### Fixed
92+
93+
- Fixed NullPointerException for the InjectAViewModelAction in [#800](https://github.com/magento/magento2-phpstorm-plugin/pull/800)
94+
- Fixed NullPointerException for a name attribute of the event tag and code style fixes in [#799](https://github.com/magento/magento2-phpstorm-plugin/pull/799)
95+
- Fixed NullPointerException for PluginReferenceProvider in [#801](https://github.com/magento/magento2-phpstorm-plugin/pull/801)
96+
97+
## 4.1.0
98+
99+
### Added
100+
101+
- Added UI integration with the Adobe Commerce Upgrade Compatibility Tool in [#625](https://github.com/magento/magento2-phpstorm-plugin/pull/625)
102+
- Added MVP version of the built-in Upgrade Compatibility Tool, read more in [wiki](https://github.com/magento/magento2-phpstorm-plugin/wiki/4.1.0-Release#the-built-in-upgrade-compatibility-tool)
103+
7104
## 4.0.0
8105

106+
### Added
107+
108+
- Added XML file header include code template in [#615](https://github.com/magento/magento2-phpstorm-plugin/pull/615)
109+
- 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)
110+
- Added DI XML plugin type attribute inspections in [#588](https://github.com/magento/magento2-phpstorm-plugin/pull/588)
111+
- Added Web API interface for service (PHP class) generation in [#586](https://github.com/magento/magento2-phpstorm-plugin/pull/586)
112+
- 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)
113+
- Added DI XML preference tag attributes inspections in [#578](https://github.com/magento/magento2-phpstorm-plugin/pull/578)
114+
- Added Web API XML service tag attributes inspections in [#577](https://github.com/magento/magento2-phpstorm-plugin/pull/577)
115+
- 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)
116+
- 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)
117+
- Added JS and CSS support for Copy Magento Path action in [#536](https://github.com/magento/magento2-phpstorm-plugin/pull/536)
118+
119+
### Changed
120+
121+
- Changed the content of the generated plugin class in [#612](https://github.com/magento/magento2-phpstorm-plugin/pull/612)
122+
- 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)
123+
124+
### Fixed
125+
126+
- Fixed a casting exception in the XML index in [#617](https://github.com/magento/magento2-phpstorm-plugin/pull/617)
127+
- Fixed a bug with plugin generation for complex non-primitive types in [#609](https://github.com/magento/magento2-phpstorm-plugin/pull/609)
128+
- Fixed a bug with the namespace generation in a generated controller in [#571](https://github.com/magento/magento2-phpstorm-plugin/pull/571)
129+
- Fixed a bug with directory validation for the generation dialogues in [#565](https://github.com/magento/magento2-phpstorm-plugin/pull/565)
130+
- Fixed wrong entity data mapper file template position in [#549](https://github.com/magento/magento2-phpstorm-plugin/pull/549)
131+
- Fixed incorrect data saving into table model within editing a table in [#544](https://github.com/magento/magento2-phpstorm-plugin/pull/544)
132+
- Fixed an error when plugin or observer name is not set in [#533](https://github.com/magento/magento2-phpstorm-plugin/pull/533)
133+
- Fixed incorrect duplication warning for disabled plugin in di.xml in [#529](https://github.com/magento/magento2-phpstorm-plugin/pull/529)
134+
135+
## 3.2.2
136+
137+
### Fixed
138+
139+
- New entity layout name and edit entity layout name inside it
140+
- `Java.lang.IllegalArgumentException` During adding a new method into an existing plugin
141+
142+
## 3.2.1
143+
144+
### Fixed
145+
146+
- Directory validator
147+
- Entity data mapper file template
148+
9149
## 3.2.0
10150

11151
### Added

README.md

+32-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
[![Version](http://phpstorm.espend.de/badge/8024/version)](https://plugins.jetbrains.com/plugin/8024)
1010
[![Downloads](http://phpstorm.espend.de/badge/8024/downloads)](https://plugins.jetbrains.com/plugin/8024)
11-
![merge-chance-badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fmerge-chance.info%2Fbadge%3Frepo%3Dmagento/magento2-phpstorm-plugin)
1211
[![Made With Love](https://img.shields.io/badge/Made%20With-Love-orange.svg)](https://magento.com)
1312

1413
## Installation
@@ -22,7 +21,7 @@
2221

2322
## Works with
2423

25-
* PhpStorm >= 2021.1
24+
* PhpStorm >= 2021.2.1
2625
* JRE >= 11
2726

2827
## Features
@@ -43,8 +42,11 @@
4342

4443
1. Check out this repository
4544
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 `1.0.0-develop`)
47-
1. Right-click on the `build.gradle` file, choose "Import Gradle project" (you need to have Gradle plugin installed)
45+
1. Make sure that you on the latest develop branch (e.g `4.3.0-develop`)
46+
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)
47+
1. Check if the right SDK version is used for the project.
48+
- 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`
49+
- Check if right SDK version is used for the Gradle plugin: `Intellij IDEA > Preferences... > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM` and choose your JDK.
4850
1. When the Gradle sections appeared in the right bar, navigate there and right-click `magento-2-php-storm-plugin > Tasks -> Intellij -> runIde`
4951
1. Click `Run "magento-2-php-storm-plugin"` to run the plugin. You should see a new instance of IntelliJ launched with the plugin installed. Make sure the plugin is enabled in IntelliJ settings and indexing is finished. Plugin features should be accessible at this point.
5052

@@ -57,6 +59,32 @@
5759
3) The issue will appear in the `Ready for Grooming` column of the [Community Backlog](https://github.com/magento/magento2-phpstorm-plugin/projects/2). Once it will be discussed and approved the issue will be ready for development.
5860
4) Refer to the [Contributing Guide](https://github.com/magento/magento2-phpstorm-plugin/blob/2.1.0-develop/.github/CONTRIBUTING.md) for more information on how to contribute.
5961

62+
## How to create SandBox for development
63+
1. Create sandbox folder
64+
2. Copy to sandbox folder `composer.json` and `composer.lock`
65+
3. In sandbox folder create `app/code` and `vendor/magento`
66+
4. Copy any of the magento modules (as for example: `framework`, `module-catalog`, `module-checkout`, `module-customer`, `module-sales`) into the `vendor/magento` folder. It is better to add as few modules as possible to reduce reindexing time during application running
67+
5. (Nice to have) Open IDE and go to `Preferences > Editor > File and Code Templates > Includes tab` and add default headers for `PHP File Header` and `XML File Header`
68+
69+
**PHP File Header:**
70+
```php
71+
/**
72+
* Copyright © Magento, Inc. All rights reserved.
73+
* See COPYING.txt for license details.
74+
*/
75+
declare(strict_types=1);
76+
```
77+
78+
**XML File Header:**
79+
```xml
80+
<!--
81+
/**
82+
* Copyright © Magento, Inc. All rights reserved.
83+
* See COPYING.txt for license details.
84+
*/
85+
-->
86+
```
87+
6088
### <img src="https://upload.wikimedia.org/wikipedia/commons/7/76/Slack_Icon.png" width="20"> Join the [#phpstorm-plugin](https://magentocommeng.slack.com/archives/C010C2LUCEA) Slack channel to get more involved
6189

6290
## License

build.gradle

+17-16
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,54 @@
44
*/
55

66
plugins {
7-
id 'org.jetbrains.intellij' version '0.6.5'
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.3.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.55")
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.1.2',
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

@@ -69,7 +69,7 @@ sourceSets {
6969
publishPlugin {
7070
token = System.getenv("MAGENTO_PHPSTORM_intellijPublishToken")
7171
if (Boolean.valueOf(System.getenv("MAGENTO_PHPSTORM_isAlpha"))) {
72-
channels 'alpha'
72+
channels = ['alpha']
7373
version = version + "-alpha-" + getDate()
7474
}
7575
}
@@ -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
@@ -106,6 +106,7 @@ idea {
106106

107107
dependencies {
108108
testImplementation 'junit:junit:4.13'
109+
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
109110
}
110111

111112
test {

gradle-tasks/checkstyle/checkstyle.xml

+4
Original file line numberDiff line numberDiff line change
@@ -330,4 +330,8 @@
330330
</module>
331331
</module>
332332
<module name="SuppressWarningsFilter"/>
333+
<module name="RegexpHeader">
334+
<property name="header" value="^\/\*\n \* Copyright © Magento, Inc."/>
335+
<property name="fileExtensions" value="java"/>
336+
</module>
333337
</module>

gradle-tasks/staticChecks.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ checkstyle {
1919
pmd {
2020
toolVersion = "6.21.0"
2121
consoleOutput = true
22-
rulePriority = 5
2322
ruleSets = [
2423
rootProject.file("gradle-tasks/pmd/ruleset.xml")
2524
]

0 commit comments

Comments
 (0)