Skip to content

Commit c8464cc

Browse files
authored
Merge branch '2.1.0-develop' into add_template_desc_to_regular_class
2 parents c74fa44 + 0dfc0b3 commit c8464cc

File tree

4 files changed

+110
-0
lines changed

4 files changed

+110
-0
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,36 @@ 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+
## 2.1.0
8+
9+
### Added
10+
11+
- Description for "Magento Routes XML" code template in [#349](https://github.com/magento/magento2-phpstorm-plugin/pull/349)
12+
- Code completion and reference navigation for table names and column names in `db_schema.xml` file in [#351](https://github.com/magento/magento2-phpstorm-plugin/pull/351)
13+
- Code completion and reference navigation for UI Component names in layout XMLs in [#354](https://github.com/magento/magento2-phpstorm-plugin/pull/354)
14+
- Description for "Magento Layout XML" code template in [#365](https://github.com/magento/magento2-phpstorm-plugin/pull/365)
15+
- Code completion and reference navigation for Magento module names in `module.xml` in [#367](https://github.com/magento/magento2-phpstorm-plugin/pull/367)
16+
- Reference navigation for disabled plugins in `di.xml` in [#373](https://github.com/magento/magento2-phpstorm-plugin/pull/373)
17+
- Code completion and reference navigation for Magento module names in `config.php` in [#374](https://github.com/magento/magento2-phpstorm-plugin/pull/374)
18+
- Inspection warning when disabling a nonexistent plugin in `di.xml` in [#382](https://github.com/magento/magento2-phpstorm-plugin/pull/382)
19+
- Description for "Magento Form Button Block Class" code template in [#383](https://github.com/magento/magento2-phpstorm-plugin/pull/383)
20+
- Code generation for database models (model, resource model, and collection) in [#392](https://github.com/magento/magento2-phpstorm-plugin/pull/392)
21+
- Code generation for data models (data interface and its implementation) in [#399](https://github.com/magento/magento2-phpstorm-plugin/pull/399)
22+
- QuickFix for a missing GraphQL resolver defined in the the `schema.graphqls` file in [#399](https://github.com/magento/magento2-phpstorm-plugin/pull/399)
23+
24+
### Fixed
25+
26+
- Inability to save PhpStorm plugin settings after disabling the plugin with invalid field content in [#317](https://github.com/magento/magento2-phpstorm-plugin/pull/317)
27+
- Field statuses in PhpStorm plugin settings not disabling if plugin is disabled in [#320](https://github.com/magento/magento2-phpstorm-plugin/pull/320)
28+
- Missing linemarker for plugins to interface methods in [#328](https://github.com/magento/magento2-phpstorm-plugin/pull/328)
29+
- Incorrect code completion for MFTF tags (stories, title, and description) in [#364](https://github.com/magento/magento2-phpstorm-plugin/pull/364)
30+
- Argument name for types in `di.xml` not allowing underscores in [#370](https://github.com/magento/magento2-phpstorm-plugin/pull/370)
31+
- Incorrect sort order validation in 'Create a New Plugin' code generation dialog in [#389](https://github.com/magento/magento2-phpstorm-plugin/pull/389)
32+
33+
### Changed
34+
35+
- Code generation dialog titles in [#363](https://github.com/magento/magento2-phpstorm-plugin/pull/363)
36+
737
## 2.0.2
838

939
### Added
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Catalog\Plugin\Block;
8+
9+
class Topmenu
10+
{
11+
public function aroundSomeMethod(\Magento\Theme\Block\Html\Topmenu $subject, \Magento\Theme\Block\Html\Topmenu $proceed)
12+
{
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Catalog\Plugin\Block;
8+
9+
class Topmenu
10+
{
11+
public function aroundSomeMethod(\Magento\Catalog\Block\Navigation $subject, callable $proceed)
12+
{
13+
}
14+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.inspections.php;
7+
8+
import com.jetbrains.php.PhpBundle;
9+
10+
public class PluginInspectionTest extends InspectionPhpFixtureTestCase {
11+
12+
@Override
13+
public void setUp() throws Exception {
14+
super.setUp();
15+
myFixture.enableInspections(PluginInspection.class);
16+
}
17+
18+
@Override
19+
protected boolean isWriteActionRequired() {
20+
return false;
21+
}
22+
23+
/**
24+
* Inspection highlights error in parameter type.
25+
*/
26+
public void testWithWrongParameterType() {
27+
myFixture.configureByFile(getFixturePath("Plugin.php"));
28+
29+
final String wrongParameterError = PhpBundle.message(
30+
"inspection.wrong_param_type",
31+
"\\Magento\\Catalog\\Block\\Navigation",
32+
"\\Magento\\Theme\\Block\\Html\\Topmenu"
33+
);
34+
35+
assertHasHighlighting(wrongParameterError);
36+
}
37+
38+
/**
39+
* Inspection highlights error in callable parameter type.
40+
*/
41+
public void testWithWrongCallableType() {
42+
myFixture.configureByFile(getFixturePath("Plugin.php"));
43+
44+
final String wrongParameterError = PhpBundle.message(
45+
"inspection.wrong_param_type",
46+
"\\Magento\\Theme\\Block\\Html\\Topmenu",
47+
"callable"
48+
);
49+
50+
assertHasHighlighting(wrongParameterError);
51+
}
52+
}

0 commit comments

Comments
 (0)