Skip to content

Commit e73e600

Browse files
authored
Merge pull request #466 from magento/pre-release-3.1.0
Pre release 3.1.0
2 parents 081fc74 + 2f786d1 commit e73e600

File tree

33 files changed

+879
-151
lines changed

33 files changed

+879
-151
lines changed

CHANGELOG.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
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).
66

77
## 3.1.0
88

99
### Added
1010

11-
- Extended `.phpstorm.meta.php` for more convenient autocomplete
11+
- Extended `.phpstorm.meta.php` for more convenient autocomplete [#467](https://github.com/magento/magento2-phpstorm-plugin/pull/467)
12+
- Code generation for message queue in [#411](https://github.com/magento/magento2-phpstorm-plugin/pull/411)
13+
- Code generation for declarative schema [#453](https://github.com/magento/magento2-phpstorm-plugin/pull/453)
14+
- Inspection warning for disabled observer [#432](https://github.com/magento/magento2-phpstorm-plugin/pull/432)
15+
- 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)
16+
17+
### Fixed
18+
19+
- The null pointer exception on the Create Module Dialog
1220

1321
## 3.0.4
1422

README.md

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

resources/META-INF/plugin.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@
236236
<extensions defaultExtensionNs="com.jetbrains.php">
237237
<frameworkProjectConfigurableProvider implementation="com.magento.idea.magento2plugin.project.ConfigurableProvider"/>
238238
<frameworkUsageProvider implementation="com.magento.idea.magento2plugin.project.UsagesProvider"/>
239-
<libraryRoot id="phpstorm.meta.php" path="/phpstorm.meta.php/" runtime="false"/>
239+
<libraryRoot id="phpstorm.meta.php" path="/.phpstorm.meta.php/" runtime="false"/>
240240
</extensions>
241-
242241
</idea-plugin>

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

-1
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};

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

-1
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};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
#parse("PHP File Header.php")
3+
#if (${NAMESPACE})
4+
5+
namespace ${NAMESPACE};
6+
#end
7+
8+
use Magento\Framework\MessageQueue\ConsumerInterface;
9+
10+
class ${CLASS_NAME} implements ConsumerInterface
11+
{
12+
public function process($maxNumberOfMessages = null)
13+
{
14+
// TODO: Implement process() method.
15+
}
16+
}

resources/fileTemplates/internal/Magento Message Queue Consumer Class.php.html

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
#parse("PHP File Header.php")
3+
#if (${NAMESPACE})
4+
5+
namespace ${NAMESPACE};
6+
#end
7+
8+
class ${CLASS_NAME}
9+
{
10+
public function execute()
11+
{
12+
//TODO: implement method
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/com/magento/idea/magento2plugin/actions/generation/NewDbSchemaAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.jetbrains.annotations.NotNull;
1919

2020
public class NewDbSchemaAction extends AnAction {
21-
public static final String ACTION_NAME = "Declarative Schema XML";
21+
public static final String ACTION_NAME = "Magento 2 Declarative Schema XML";
2222
public static final String ACTION_DESCRIPTION = "Create a new declarative schema XML";
2323

2424
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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.data;
7+
8+
import com.magento.idea.magento2plugin.magento.files.MessageQueueClassPhp;
9+
10+
@SuppressWarnings({"PMD.DataClass"})
11+
public class MessageQueueClassData {
12+
private final String name;
13+
private final String namespace;
14+
private final String path;
15+
private final String fqn;
16+
private final MessageQueueClassPhp.Type type;
17+
18+
/**
19+
* MessageQueueClassData constructor.
20+
*
21+
* @param name String
22+
* @param namespace String
23+
* @param path String
24+
* @param fqn String
25+
* @param type MessageQueueClassPhp.Type
26+
*/
27+
public MessageQueueClassData(
28+
final String name,
29+
final String namespace,
30+
final String path,
31+
final String fqn,
32+
final MessageQueueClassPhp.Type type
33+
) {
34+
this.name = name;
35+
this.namespace = namespace;
36+
this.path = path;
37+
this.fqn = fqn;
38+
this.type = type;
39+
}
40+
41+
/**
42+
* Get data provider class name.
43+
*
44+
* @return String
45+
*/
46+
public String getName() {
47+
return name;
48+
}
49+
50+
/**
51+
* Get data provider class namespace.
52+
*
53+
* @return String
54+
*/
55+
public String getNamespace() {
56+
return namespace;
57+
}
58+
59+
/**
60+
* Get path.
61+
*
62+
* @return String
63+
*/
64+
public String getPath() {
65+
return path;
66+
}
67+
68+
/**
69+
* Get FQN.
70+
*
71+
* @return String
72+
*/
73+
public String getFqn() {
74+
return fqn;
75+
}
76+
77+
/**
78+
* Get Type.
79+
*
80+
* @return MessageQueueClassPhp.Type
81+
*/
82+
public MessageQueueClassPhp.Type getType() {
83+
return type;
84+
}
85+
}

src/com/magento/idea/magento2plugin/actions/generation/data/QueueConsumerData.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class QueueConsumerData {
1212
private final String maxMessages;
1313
private final String connectionName;
1414
private final String moduleName;
15+
private final String handler;
1516

1617
/**
1718
* Constructor.
@@ -22,14 +23,16 @@ public QueueConsumerData(
2223
final String consumerType,
2324
final String maxMessages,
2425
final String connectionName,
25-
final String moduleName
26+
final String moduleName,
27+
final String handler
2628
) {
2729
this.consumerName = consumerName;
2830
this.queueName = queueName;
2931
this.consumerType = consumerType;
3032
this.maxMessages = maxMessages;
3133
this.connectionName = connectionName;
3234
this.moduleName = moduleName;
35+
this.handler = handler;
3336
}
3437

3538
public String getConsumerName() {
@@ -40,7 +43,7 @@ public String getQueueName() {
4043
return queueName;
4144
}
4245

43-
public String getConsumerType() {
46+
public String getConsumerClass() {
4447
return consumerType;
4548
}
4649

@@ -55,4 +58,8 @@ public String getConnectionName() {
5558
public String getModuleName() {
5659
return moduleName;
5760
}
61+
62+
public String getHandler() {
63+
return handler;
64+
}
5865
}

0 commit comments

Comments
 (0)