Skip to content

Commit dc30b4a

Browse files
authored
Merge pull request #2498 from vitaliyboykocontributor/2487-Must-not-start-write-action-from-within-read-action-in-the-other-thread-
2487: Add dispatch thread check before applying fix
2 parents cb6e815 + db9a41e commit dc30b4a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
1010

1111
- Compatibility with PhpStorm/IntelliJ 2025.* [#2495](https://github.com/magento/magento2-phpstorm-plugin/pull/2495)
1212
- "Copy Path/Reference" does not show the preview value [#2497](https://github.com/magento/magento2-phpstorm-plugin/pull/2497)
13+
- Must not start write action from within read action in the other thread [#2498](https://github.com/magento/magento2-phpstorm-plugin/pull/2498)
1314

1415
## 2025.0.0
1516

src/main/java/com/magento/idea/magento2plugin/inspections/php/fix/PhpModuleNameQuickFix.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import com.intellij.codeInspection.LocalQuickFix;
99
import com.intellij.codeInspection.ProblemDescriptor;
10+
import com.intellij.openapi.application.ApplicationManager;
1011
import com.intellij.openapi.command.WriteCommandAction;
1112
import com.intellij.openapi.project.Project;
1213
import com.jetbrains.php.lang.psi.elements.StringLiteralExpression;
@@ -38,7 +39,9 @@ public void applyFix(
3839
) {
3940
final StringLiteralExpression expression =
4041
(StringLiteralExpression) descriptor.getPsiElement();
41-
applyFix(expression);
42+
if (ApplicationManager.getApplication().isDispatchThread()) {
43+
applyFix(expression);
44+
}
4245
}
4346

4447
private void applyFix(final StringLiteralExpression expression) {

0 commit comments

Comments
 (0)