Skip to content

Commit

Permalink
Merge pull request #466 from magento/pre-release-3.1.0
Browse files Browse the repository at this point in the history
Pre release 3.1.0
  • Loading branch information
coderimus authored Feb 10, 2021
2 parents 081fc74 + 2f786d1 commit e73e600
Show file tree
Hide file tree
Showing 33 changed files with 879 additions and 151 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@

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

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

## 3.1.0

### Added

- Extended `.phpstorm.meta.php` for more convenient autocomplete
- Extended `.phpstorm.meta.php` for more convenient autocomplete [#467](https://github.com/magento/magento2-phpstorm-plugin/pull/467)
- Code generation for message queue in [#411](https://github.com/magento/magento2-phpstorm-plugin/pull/411)
- Code generation for declarative schema [#453](https://github.com/magento/magento2-phpstorm-plugin/pull/453)
- Inspection warning for disabled observer [#432](https://github.com/magento/magento2-phpstorm-plugin/pull/432)
- 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)

### Fixed

- The null pointer exception on the Create Module Dialog

## 3.0.4

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[![Version](http://phpstorm.espend.de/badge/8024/version)](https://plugins.jetbrains.com/plugin/8024)
[![Downloads](http://phpstorm.espend.de/badge/8024/downloads)](https://plugins.jetbrains.com/plugin/8024)
![merge-chance-badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fmerge-chance.info%2Fbadge%3Frepo%3Dmagento/magento2-phpstorm-plugin)
[![Made With Love](https://img.shields.io/badge/Made%20With-Love-orange.svg)](https://magento.com)

## Installation

Expand Down
3 changes: 1 addition & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@
<extensions defaultExtensionNs="com.jetbrains.php">
<frameworkProjectConfigurableProvider implementation="com.magento.idea.magento2plugin.project.ConfigurableProvider"/>
<frameworkUsageProvider implementation="com.magento.idea.magento2plugin.project.UsagesProvider"/>
<libraryRoot id="phpstorm.meta.php" path="/phpstorm.meta.php/" runtime="false"/>
<libraryRoot id="phpstorm.meta.php" path="/.phpstorm.meta.php/" runtime="false"/>
</extensions>

</idea-plugin>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
#parse("PHP File Header.php")
declare(strict_types=1);

#if (${NAMESPACE})
namespace ${NAMESPACE};
Expand Down
1 change: 0 additions & 1 deletion resources/fileTemplates/internal/Magento Data Model.php.ft
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
#parse("PHP File Header.php")
declare(strict_types=1);

#if (${NAMESPACE})
namespace ${NAMESPACE};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
#parse("PHP File Header.php")
#if (${NAMESPACE})

namespace ${NAMESPACE};
#end

use Magento\Framework\MessageQueue\ConsumerInterface;

class ${CLASS_NAME} implements ConsumerInterface
{
public function process($maxNumberOfMessages = null)
{
// TODO: Implement process() method.
}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
#parse("PHP File Header.php")
#if (${NAMESPACE})

namespace ${NAMESPACE};
#end

class ${CLASS_NAME}
{
public function execute()
{
//TODO: implement method
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.jetbrains.annotations.NotNull;

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

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

package com.magento.idea.magento2plugin.actions.generation.data;

import com.magento.idea.magento2plugin.magento.files.MessageQueueClassPhp;

@SuppressWarnings({"PMD.DataClass"})
public class MessageQueueClassData {
private final String name;
private final String namespace;
private final String path;
private final String fqn;
private final MessageQueueClassPhp.Type type;

/**
* MessageQueueClassData constructor.
*
* @param name String
* @param namespace String
* @param path String
* @param fqn String
* @param type MessageQueueClassPhp.Type
*/
public MessageQueueClassData(
final String name,
final String namespace,
final String path,
final String fqn,
final MessageQueueClassPhp.Type type
) {
this.name = name;
this.namespace = namespace;
this.path = path;
this.fqn = fqn;
this.type = type;
}

/**
* Get data provider class name.
*
* @return String
*/
public String getName() {
return name;
}

/**
* Get data provider class namespace.
*
* @return String
*/
public String getNamespace() {
return namespace;
}

/**
* Get path.
*
* @return String
*/
public String getPath() {
return path;
}

/**
* Get FQN.
*
* @return String
*/
public String getFqn() {
return fqn;
}

/**
* Get Type.
*
* @return MessageQueueClassPhp.Type
*/
public MessageQueueClassPhp.Type getType() {
return type;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class QueueConsumerData {
private final String maxMessages;
private final String connectionName;
private final String moduleName;
private final String handler;

/**
* Constructor.
Expand All @@ -22,14 +23,16 @@ public QueueConsumerData(
final String consumerType,
final String maxMessages,
final String connectionName,
final String moduleName
final String moduleName,
final String handler
) {
this.consumerName = consumerName;
this.queueName = queueName;
this.consumerType = consumerType;
this.maxMessages = maxMessages;
this.connectionName = connectionName;
this.moduleName = moduleName;
this.handler = handler;
}

public String getConsumerName() {
Expand All @@ -40,7 +43,7 @@ public String getQueueName() {
return queueName;
}

public String getConsumerType() {
public String getConsumerClass() {
return consumerType;
}

Expand All @@ -55,4 +58,8 @@ public String getConnectionName() {
public String getModuleName() {
return moduleName;
}

public String getHandler() {
return handler;
}
}
Loading

0 comments on commit e73e600

Please sign in to comment.