Skip to content

Commit d1c65f3

Browse files
author
Vitaliy Boyko
committed
Merge branch '3.2.0-develop' of github.com:magento/magento2-phpstorm-plugin into mainline-entity-manager
2 parents 346c756 + 9741814 commit d1c65f3

File tree

45 files changed

+1359
-159
lines changed

Some content is hidden

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

45 files changed

+1359
-159
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, 3.1.0-develop ]
8+
branches: [ master, 3.2.0-develop ]
99

1010
jobs:
1111
build-linux:

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,24 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
6+
7+
## 3.2.0
68

79
## 3.1.0
810

11+
### Added
12+
13+
- Extended `.phpstorm.meta.php` for more convenient autocomplete [#467](https://github.com/magento/magento2-phpstorm-plugin/pull/467)
14+
- Code generation for message queue in [#411](https://github.com/magento/magento2-phpstorm-plugin/pull/411)
15+
- Code generation for declarative schema [#453](https://github.com/magento/magento2-phpstorm-plugin/pull/453)
16+
- Inspection warning for disabled observer [#432](https://github.com/magento/magento2-phpstorm-plugin/pull/432)
17+
- The action item to the context menu to copy file path in the Magento format [#451](https://github.com/magento/magento2-phpstorm-plugin/pull/451)
18+
19+
### Fixed
20+
21+
- The null pointer exception on the Create Module Dialog
22+
923
## 3.0.4
1024

1125
### Fixed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
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)
1111
![merge-chance-badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fmerge-chance.info%2Fbadge%3Frepo%3Dmagento/magento2-phpstorm-plugin)
12+
[![Made With Love](https://img.shields.io/badge/Made%20With-Love-orange.svg)](https://magento.com)
1213

1314
## Installation
1415

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repositories {
1515
}
1616

1717
group 'com.magento.idea'
18-
version '3.1.0'
18+
version '3.2.0'
1919

2020
apply plugin: 'org.jetbrains.intellij'
2121
apply plugin: 'java'
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace PHPSTORM_META {
6+
7+
override(\Magento\Framework\ObjectManagerInterface::get(0), map(['' => '@']));
8+
override(\Magento\Framework\ObjectManagerInterface::create(0), map(['' => '@']));
9+
10+
override(\Magento\Framework\View\LayoutInterface::createBlock(0), map(['' => '@']));
11+
override(\Magento\Framework\View\TemplateEngine\Php::helper(0), map(['' => '@']));
12+
13+
override(
14+
\Magento\Framework\Controller\ResultFactory::create(0),
15+
map(
16+
[
17+
\Magento\Framework\Controller\ResultFactory::TYPE_FORWARD => \Magento\Framework\Controller\Result\Forward::class,
18+
\Magento\Framework\Controller\ResultFactory::TYPE_JSON => \Magento\Framework\Controller\Result\Json::class,
19+
\Magento\Framework\Controller\ResultFactory::TYPE_LAYOUT => \Magento\Framework\View\Result\Layout::class,
20+
\Magento\Framework\Controller\ResultFactory::TYPE_PAGE => \Magento\Framework\View\Result\Page::class,
21+
\Magento\Framework\Controller\ResultFactory::TYPE_RAW => \Magento\Framework\Controller\Result\Raw::class,
22+
\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT => \Magento\Framework\Controller\Result\Redirect::class,
23+
]
24+
)
25+
);
26+
27+
expectedArguments(
28+
\Magento\Framework\Controller\ResultFactory::create(),
29+
0,
30+
\Magento\Framework\Controller\ResultFactory::TYPE_FORWARD,
31+
\Magento\Framework\Controller\ResultFactory::TYPE_JSON,
32+
\Magento\Framework\Controller\ResultFactory::TYPE_LAYOUT,
33+
\Magento\Framework\Controller\ResultFactory::TYPE_PAGE,
34+
\Magento\Framework\Controller\ResultFactory::TYPE_RAW,
35+
\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT
36+
);
37+
38+
registerArgumentsSet(
39+
'scope_types',
40+
\Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
41+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
42+
\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE
43+
);
44+
expectedArguments(
45+
\Magento\Framework\App\Config\ScopeConfigInterface::getValue(),
46+
1,
47+
argumentsSet('scope_types')
48+
);
49+
expectedArguments(
50+
\Magento\Framework\App\Config\ScopeConfigInterface::isSetFlag(),
51+
1,
52+
argumentsSet('scope_types')
53+
);
54+
expectedArguments(
55+
\Magento\Framework\App\Config\MutableScopeConfigInterface::setValue(),
56+
2,
57+
argumentsSet('scope_types')
58+
);
59+
60+
registerArgumentsSet(
61+
'condition_types',
62+
'eq',
63+
'in',
64+
'is',
65+
'to',
66+
'finset',
67+
'from',
68+
'gt',
69+
'gteq',
70+
'like',
71+
'lt',
72+
'lteq',
73+
'moreq',
74+
'neq',
75+
'nin',
76+
'notnull',
77+
'null'
78+
);
79+
expectedArguments(\Magento\Framework\Api\SearchCriteriaBuilder::addFilter(), 2, argumentsSet('condition_types'));
80+
expectedArguments(\Magento\Framework\Api\FilterBuilder::setConditionType(), 0, argumentsSet('condition_types'));
81+
82+
expectedArguments(
83+
\Magento\Framework\Api\SearchCriteriaBuilder::addSortOrder(),
84+
0,
85+
\Magento\Framework\Api\SortOrder::SORT_ASC,
86+
\Magento\Framework\Api\SortOrder::SORT_DESC
87+
);
88+
89+
registerArgumentsSet(
90+
'field_types',
91+
'button',
92+
'checkbox',
93+
'checkboxes',
94+
'column',
95+
'date',
96+
'editablemultiselect',
97+
'editor',
98+
'fieldset',
99+
'file',
100+
'gallery',
101+
'hidden',
102+
'image',
103+
'imagefile',
104+
'label',
105+
'link',
106+
'multiline',
107+
'multiselect',
108+
'note',
109+
'obscure',
110+
'password',
111+
'radio',
112+
'radios',
113+
'reset',
114+
'select',
115+
'submit',
116+
'text',
117+
'textarea',
118+
'time'
119+
);
120+
expectedArguments(\Magento\Framework\Data\Form\AbstractForm::addField(), 1, argumentsSet('field_types'));
121+
expectedArguments(\Magento\Framework\Data\Form\Element\Fieldset::addField(), 1, argumentsSet('field_types'));
122+
123+
}

resources/META-INF/plugin.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<idea-plugin>
88
<id>com.magento.idea.magento2plugin</id>
99
<name>Magento PhpStorm</name>
10-
<version>3.1.0</version>
10+
<version>3.2.0</version>
1111
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>
1212

1313
<description><![CDATA[
@@ -144,6 +144,7 @@
144144
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.PluginTargetLineMarkerProvider"/>
145145
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.ClassConfigurationLineMarkerProvider"/>
146146
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.WebApiLineMarkerProvider"/>
147+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.TestFixtureLineMarkerProvider"/>
147148

148149
<directoryProjectConfigurator implementation="com.magento.idea.magento2plugin.project.ProjectDetector"/>
149150

@@ -244,7 +245,6 @@
244245
<extensions defaultExtensionNs="com.jetbrains.php">
245246
<frameworkProjectConfigurableProvider implementation="com.magento.idea.magento2plugin.project.ConfigurableProvider"/>
246247
<frameworkUsageProvider implementation="com.magento.idea.magento2plugin.project.UsagesProvider"/>
247-
<libraryRoot id="phpstorm.meta.php" path="/phpstorm.meta.php/" runtime="false"/>
248+
<libraryRoot id="phpstorm.meta.php" path="/.phpstorm.meta.php/" runtime="false"/>
248249
</extensions>
249-
250250
</idea-plugin>

resources/fileTemplates/internal/Magento Data Model Interface.php.ft

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
#parse("PHP File Header.php")
3-
declare(strict_types=1);
43

54
#if (${NAMESPACE})
65
namespace ${NAMESPACE};
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!--
2+
/*
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td><font face="verdana" size="-1">
12+
The data model interface indicates all the setters and getters for the related data model.
13+
This used to maintain the integrity of the data, even if there is any changes in the model you will always get consistent data.
14+
</font><br>
15+
</td>
16+
</tr>
17+
</table>
18+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
19+
<tr>
20+
<td colspan="3"><font face="verdana" size="-1">Predefined variables explanation:</font></td>
21+
</tr>
22+
<tr>
23+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAMESPACE}</b></font></nobr></td>
24+
<td width="10">&nbsp;</td>
25+
<td width="100%" valign="top"><font face="verdana" size="-1">A fully qualified name of the field namespace without a leading slash.
26+
</font>
27+
</td>
28+
</tr>
29+
<tr>
30+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${USE}</b></font></nobr></td>
31+
<td width="10">&nbsp;</td>
32+
<td width="100%" valign="top"><font face="verdana" size="-1">List of imports separated by comma.
33+
</font>
34+
</td>
35+
</tr>
36+
<tr>
37+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAME}</b></font></nobr></td>
38+
<td width="10">&nbsp;</td>
39+
<td width="100%" valign="top"><font face="verdana" size="-1">PHP Class name.
40+
</font>
41+
</td>
42+
</tr>
43+
<tr>
44+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${EXTENDS}</b></font></nobr></td>
45+
<td width="10">&nbsp;</td>
46+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class extends.
47+
</font>
48+
</td>
49+
</tr>
50+
<tr>
51+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${IMPLEMENTS}</b></font></nobr></td>
52+
<td width="10">&nbsp;</td>
53+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class implements.
54+
</font>
55+
</td>
56+
</tr>
57+
<tr>
58+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${PROPERTIES}</b></font></nobr></td>
59+
<td width="10">&nbsp;</td>
60+
<td width="100%" valign="top"><font face="verdana" size="-1">Class member variables.
61+
</font>
62+
</td>
63+
</tr>
64+
</table>
65+
</body>
66+
</html>

resources/fileTemplates/internal/Magento Data Model.php.ft

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
#parse("PHP File Header.php")
3-
declare(strict_types=1);
43

54
#if (${NAMESPACE})
65
namespace ${NAMESPACE};
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!--
2+
/*
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td><font face="verdana" size="-1">
12+
The data model is a stateful data transfer object (DTO) that introduces simple data PHP object that contains only getters and setters.
13+
In other words, data models are interfaces that define the list of data properties other components can expect from them.
14+
</font><br>
15+
</td>
16+
</tr>
17+
<tr>
18+
<td><font face="verdana" size="-1">
19+
Link to documentation
20+
<a href="https://www.mageplaza.com/magento-2-module-development/how-to-create-crud-model-magento-2.html">
21+
DevDocs</a>.
22+
</font><br>
23+
</td>
24+
</tr>
25+
</table>
26+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
27+
<tr>
28+
<td colspan="3"><font face="verdana" size="-1">Predefined variables explanation:</font></td>
29+
</tr>
30+
<tr>
31+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAMESPACE}</b></font></nobr></td>
32+
<td width="10">&nbsp;</td>
33+
<td width="100%" valign="top"><font face="verdana" size="-1">A fully qualified name of the field namespace without a leading slash.
34+
</font>
35+
</td>
36+
</tr>
37+
<tr>
38+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${USE}</b></font></nobr></td>
39+
<td width="10">&nbsp;</td>
40+
<td width="100%" valign="top"><font face="verdana" size="-1">List of imports separated by comma.
41+
</font>
42+
</td>
43+
</tr>
44+
<tr>
45+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAME}</b></font></nobr></td>
46+
<td width="10">&nbsp;</td>
47+
<td width="100%" valign="top"><font face="verdana" size="-1">PHP Class name.
48+
</font>
49+
</td>
50+
</tr>
51+
<tr>
52+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${EXTENDS}</b></font></nobr></td>
53+
<td width="10">&nbsp;</td>
54+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class extends.
55+
</font>
56+
</td>
57+
</tr>
58+
<tr>
59+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${IMPLEMENTS}</b></font></nobr></td>
60+
<td width="10">&nbsp;</td>
61+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class implements.
62+
</font>
63+
</td>
64+
</tr>
65+
<tr>
66+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${PROPERTIES}</b></font></nobr></td>
67+
<td width="10">&nbsp;</td>
68+
<td width="100%" valign="top"><font face="verdana" size="-1">Class member variables.
69+
</font>
70+
</td>
71+
</tr>
72+
</table>
73+
</body>
74+
</html>

0 commit comments

Comments
 (0)