From fa213ac524ddd66711bf56d6b09b7fecec3bee23 Mon Sep 17 00:00:00 2001 From: vitalii Date: Sat, 15 Nov 2025 10:15:54 +0200 Subject: [PATCH 1/2] Handle null PsiDirectory input in GetModuleNameByDirectoryUtil. --- .../util/magento/GetModuleNameByDirectoryUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/magento/idea/magento2plugin/util/magento/GetModuleNameByDirectoryUtil.java b/src/main/java/com/magento/idea/magento2plugin/util/magento/GetModuleNameByDirectoryUtil.java index 619b6d9ea..9c7d0f6a0 100644 --- a/src/main/java/com/magento/idea/magento2plugin/util/magento/GetModuleNameByDirectoryUtil.java +++ b/src/main/java/com/magento/idea/magento2plugin/util/magento/GetModuleNameByDirectoryUtil.java @@ -32,9 +32,13 @@ private GetModuleNameByDirectoryUtil() {} * @return String */ public static @Nullable String execute( - final @NotNull PsiDirectory psiDirectory, + final @Nullable PsiDirectory psiDirectory, final @NotNull Project project ) { + // Gracefully handle null directory inputs from callers + if (psiDirectory == null) { + return null; + } // Check if directory is theme directory and return module name from directory path if yes final String path = psiDirectory.getVirtualFile().getPath(); final Pattern pattern = Pattern.compile(RegExUtil.CustomTheme.MODULE_NAME); From e562302e66dd821b8766defb88c91e892ec520fc Mon Sep 17 00:00:00 2001 From: vitalii Date: Sat, 15 Nov 2025 10:19:40 +0200 Subject: [PATCH 2/2] Bump version to 2025.2.2 and update changelog. --- CHANGELOG.md | 6 ++++++ gradle.properties | 2 +- src/main/resources/META-INF/plugin.xml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e51ec1638..63a239c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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). +## 2025.2.2 + +### Fixed + +- Null PsiDirectory input in GetModuleNameByDirectoryUtil [#2606](https://github.com/magento/magento2-phpstorm-plugin/pull/2606) + ## 2025.2.1 ### Fixed diff --git a/gradle.properties b/gradle.properties index 6e4de6ab7..9baa2e347 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ pluginGroup = com.magento.idea.magento2plugin pluginName = Magento PhpStorm pluginRepositoryUrl = https://github.com/magento/magento2-phpstorm-plugin -pluginVersion = 2025.2.1 +pluginVersion = 2025.2.2 pluginSinceBuild = 250.* pluginUntilBuild = 258.* platformType = PS diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 6d87fcbae..5c36b40be 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -7,7 +7,7 @@ com.magento.idea.magento2plugin Magento PhpStorm - 2025.2.1 + 2025.2.2 Magento Inc.