Skip to content

Commit b0a87e7

Browse files
authored
Merge pull request #2495 from vitaliyboykocontributor/2490-Remove-usages-of-scheduled-for-removal-API
2490 remove usages of scheduled for removal api
2 parents 0b97ee2 + 7c5a4cc commit b0a87e7

Some content is hidden

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

46 files changed

+281
-191
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ 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+
## 2025.0.1
8+
9+
### Fixed
10+
11+
- Fixed compatibility with PhpStorm/IntelliJ 2025.* [#2495](https://github.com/magento/magento2-phpstorm-plugin/pull/2495)
12+
713
## 2025.0.0
814

915
### Added

README.md

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@
77
<!-- Plugin description -->
88
# PhpStorm Magento 2 Plugin
99

10-
This is a PhpStorm IDE plugin for a better Magento 2 development workflow.
11-
12-
## Version 2025.0.0 - Contributors
13-
1410
<table align="center">
11+
<caption>
12+
This is a PhpStorm IDE plugin for a better Magento 2 development workflow.
13+
</caption>
14+
<thead>
15+
<tr>
16+
<td colspan="3" align="center">
17+
Version 2025.0.0 - Contributors
18+
</td>
19+
</tr>
20+
</thead>
21+
<tbody>
1522
<tr>
1623
<td align="center">
1724
<a href="https://github.com/YevhenZvieriev">
@@ -35,13 +42,36 @@ This is a PhpStorm IDE plugin for a better Magento 2 development workflow.
3542
</a>
3643
</td>
3744
</tr>
45+
</tbody>
46+
<tfoot>
47+
<tr>
48+
<td colspan="3" align="center">
49+
<h3>Support the Project</h3>
50+
<p>If you find this plugin helpful and want to support its development, consider buying the contributors a coffee:</p>
51+
<a href="https://buymeacoffee.com/vitalii_b">
52+
<img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-orange.svg" alt="Buy Me a Coffee">
53+
</a>
54+
<p>Thank you to our sponsors—your support means everything:</p>
55+
<p>Lucas van Staden</p>
56+
<p>Ivan Chepurnyi</p>
57+
</td>
58+
</tr>
59+
</tfoot>
3860
</table>
3961

40-
### Support the Project
41-
42-
If you find this plugin helpful and want to support its development, consider buying the contributors a coffee:
62+
## Features
4363

44-
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate-orange.svg)](https://buymeacoffee.com/vitalii_b)
64+
* Configuration smart completion and references for XML/JavaScript files
65+
* `Navigate to configuration` reference in scope of class/interface
66+
* `Go to plugin` reference in scope of class/interface and method
67+
* `Navigate to Web API configuration` reference in scope of class/interface and method
68+
* Plugin class methods generation
69+
* Plugin declaration inspection
70+
* RequireJS reference navigation and completion
71+
* MFTF reference navigation and completion
72+
* GraphQL navigation line markers
73+
* Code generation
74+
* Inspections for XML configuration
4575

4676
<!-- Plugin description end -->
4777

@@ -63,20 +93,6 @@ If you find this plugin helpful and want to support its development, consider bu
6393
* PhpStorm >= 2023.1
6494
* JRE >= 17
6595

66-
## Features
67-
68-
* Configuration smart completion and references for XML/JavaScript files
69-
* `Navigate to configuration` reference in scope of class/interface
70-
* `Go to plugin` reference in scope of class/interface and method
71-
* `Navigate to Web API configuration` reference in scope of class/interface and method
72-
* Plugin class methods generation
73-
* Plugin declaration inspection
74-
* RequireJS reference navigation and completion
75-
* MFTF reference navigation and completion
76-
* GraphQL navigation line markers
77-
* Code generation
78-
* Inspections for XML configuration
79-
8096
## Setting up development environment
8197

8298
1. Check out this repository

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
pluginGroup = com.magento.idea.magento2plugin
22
pluginName = Magento PhpStorm
33
pluginRepositoryUrl = https://github.com/magento/magento2-phpstorm-plugin
4-
pluginVersion = 2025.0.0
4+
pluginVersion = 2025.0.1
55
pluginSinceBuild = 233
6-
pluginUntilBuild = 248.*
6+
pluginUntilBuild = 258.*
77
platformType = PS
88
platformVersion = 2024.3
99
platformPlugins =

src/main/java/com/magento/idea/magento2plugin/actions/generation/CreateAnObserverAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import com.intellij.psi.PsiFile;
1818
import com.intellij.psi.PsiReference;
1919
import com.intellij.psi.tree.IElementType;
20-
import com.intellij.util.SlowOperations;
2120
import com.jetbrains.php.lang.lexer.PhpTokenTypes;
2221
import com.jetbrains.php.lang.psi.PhpFile;
2322
import com.jetbrains.php.lang.psi.elements.Method;
@@ -133,7 +132,7 @@ private boolean checkIsEventDispatchMethod(final MethodReference element) {
133132
if (elementReference == null) {
134133
return false;
135134
}
136-
final PsiElement method = SlowOperations.allowSlowOperations(elementReference::resolve);
135+
final PsiElement method = elementReference.resolve();
137136
if (!(method instanceof Method)) {
138137
return false;
139138
}

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/AbstractDialog.java

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package com.magento.idea.magento2plugin.actions.generation.dialog;
77

8+
import com.intellij.openapi.application.WriteAction;
89
import com.intellij.openapi.util.Pair;
910
import com.magento.idea.magento2plugin.actions.generation.data.ui.ComboBoxItemData;
1011
import com.magento.idea.magento2plugin.actions.generation.dialog.prompt.PlaceholderInitializerUtil;
@@ -35,10 +36,13 @@
3536
/**
3637
* All code generate dialog should extend this class.
3738
*/
39+
@SuppressWarnings({
40+
"PMD.TooManyMethods"
41+
})
3842
public abstract class AbstractDialog extends JDialog {
3943

40-
protected CommonBundle bundle;
41-
protected final ValidatorBundle validatorBundle = new ValidatorBundle();
44+
protected transient CommonBundle bundle;
45+
protected final transient ValidatorBundle validatorBundle = new ValidatorBundle();
4246
protected final List<FieldValidationData> fieldsValidationsList;
4347
private final String errorTitle;
4448
private JTabbedPane tabbedPane;
@@ -75,12 +79,37 @@ protected void exit() {
7579
dispose();
7680
}
7781

82+
/**
83+
* Executes onOK within a WriteAction context.
84+
*/
85+
protected final void executeOnOk() {
86+
WriteAction.run(this::onWriteActionOK);
87+
}
88+
89+
/**
90+
* This method should contain the core logic for onOk.
91+
* Subclasses can override to provide their implementation.
92+
* Must be invoked via executeOnOk().
93+
*/
94+
protected abstract void onWriteActionOK();
95+
96+
/**
97+
* Hook executed when the OK button is pressed.
98+
*/
99+
protected final void onOK() {
100+
executeOnOk();
101+
}
102+
78103
/**
79104
* Validate all form fields.
80105
*
81106
* @return boolean
82107
*/
83-
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.AvoidDeeplyNestedIfStmts"})
108+
@SuppressWarnings({
109+
"PMD.CyclomaticComplexity",
110+
"PMD.AvoidDeeplyNestedIfStmts",
111+
"PMD.CognitiveComplexity"
112+
})
84113
protected boolean validateFormFields() {
85114
boolean dialogHasErrors;
86115
isValidationErrorShown = dialogHasErrors = false;

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/CreateAPluginDialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ private void fillTargetAreaOptions() {
170170
}
171171
}
172172

173-
protected void onOK() {
173+
protected void onWriteActionOK() {
174+
174175
if (targetMethod == null) {
175176
targetMethod = getSelectedTargetMethod();
176177
}

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/CreateAnObserverDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ private void fillTargetAreaOptions() {
149149
/**
150150
* Perform code generation using input data.
151151
*/
152-
private void onOK() {
152+
protected void onWriteActionOK() {
153153
if (validateFormFields()) {
154154
new ObserverClassGenerator(new ObserverFileData(
155155
getObserverDirectory(),

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/GatherArrayValuesDialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ public static void open(
114114
/**
115115
* Fire process if all fields are valid.
116116
*/
117-
private void onOK() {
117+
protected void onWriteActionOK() {
118+
118119
if (itemsTable.isEditing()) {
119120
itemsTable.getCellEditor().stopCellEditing();
120121
}

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/InjectAViewModelDialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ protected void updateArgumentText() {
136136
);
137137
}
138138

139-
protected void onOK() {
139+
protected void onWriteActionOK() {
140+
140141
if (!validateFormFields()) {
141142
exit();
142143
return;

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/NewArgumentInjectionDialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ public static void open(
363363
/**
364364
* Fire generation process if all fields are valid.
365365
*/
366-
private void onOK() {
366+
protected void onWriteActionOK() {
367+
367368
if (validateFormFields()) {
368369
final DiArgumentData data = getDialogDataObject();
369370

0 commit comments

Comments
 (0)