Skip to content

Merge 4.4.0 develop into 4.4.1 develop #1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4e81303
1144: Add checks and detailed error messages during plugin activation
Sep 12, 2022
d1837a8
Fixed new intellij version compatibility issues
bohdan-harniuk Sep 12, 2022
8ac85ad
1180: Fixed ClassCastException
bohdan-harniuk Sep 12, 2022
84ee9aa
Merge pull request #1183 from bohdan-harniuk/1180-fix-ClassCastException
VitaliyBoyko Sep 12, 2022
574b638
Merge branch '4.4.0-develop' into pre-release-4.4.0
bohdan-harniuk Sep 13, 2022
c168afc
Merge branch '4.4.0-develop' into 1179-fix-compatibility-issues
VitaliyBoyko Sep 13, 2022
72a6a6a
1143 fix NullPointerException at ObserverDeclarationInspection Class
Sep 13, 2022
43c7a5c
Merge branch '4.4.0-develop' into 1143-fix-nullPointerException-at-Ob…
Sep 13, 2022
e6a4fbb
Merge pull request #1186 from SilinMykola/1143-fix-nullPointerExcepti…
bohdan-harniuk Sep 14, 2022
e51176c
Merge branch '4.4.0-develop' of github.com:magento/magento2-phpstorm-…
bohdan-harniuk Sep 14, 2022
c747546
Updated CHANGELOG.md file
bohdan-harniuk Sep 14, 2022
b089766
Merge branch '4.4.0-develop' into 1144-error-magento-installation-path
bohdan-harniuk Sep 14, 2022
8273831
1144: Removed extra empty lines
bohdan-harniuk Sep 14, 2022
e6be25d
Merge pull request #1181 from makzef/1144-error-magento-installation-…
bohdan-harniuk Sep 14, 2022
c2cc9f1
Merge branch '4.4.0-develop' of github.com:magento/magento2-phpstorm-…
bohdan-harniuk Sep 14, 2022
f142cd0
Updated CHANGELOG.md file
bohdan-harniuk Sep 14, 2022
eba1ab6
Merge branch '4.4.0-develop' into 1179-fix-compatibility-issues
VitaliyBoyko Sep 14, 2022
877fd84
Merge pull request #1182 from bohdan-harniuk/1179-fix-compatibility-i…
VitaliyBoyko Sep 14, 2022
14fac74
Merge branch '4.4.0-develop' into pre-release-4.4.0
VitaliyBoyko Sep 14, 2022
36a8f1e
Revert "Fixed new intellij version compatibility issues"
VitaliyBoyko Sep 14, 2022
8195d9f
Merge pull request #1187 from magento/revert-1182-1179-fix-compatibil…
bohdan-harniuk Sep 14, 2022
e1afca4
Merge branch '4.4.0-develop' into pre-release-4.4.0
VitaliyBoyko Sep 14, 2022
f595d1b
Merge pull request #1147 from magento/pre-release-4.4.0
bohdan-harniuk Sep 14, 2022
893d6bf
1179: moved graphql dependent actions to the withJsGraphQl.xml config…
VitaliyBoyko Sep 16, 2022
adfae0d
Merge pull request #1193 from magento/1179-graphql-dependent-actions-…
bohdan-harniuk Sep 16, 2022
20082f2
1196: Fixed customer EAV attribute generation for Magento 2.4.4
bohdan-harniuk Sep 19, 2022
18b03d4
Merge pull request #1197 from bohdan-harniuk/1196-fix-customer-eav-at…
VitaliyBoyko Sep 19, 2022
1b9eede
Merge branch '4.4.0-develop' of github.com:magento/magento2-phpstorm-…
bohdan-harniuk Sep 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.ide.highlighter.XmlFileType;
import com.intellij.openapi.externalSystem.service.execution.NotSupportedException;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
Expand Down Expand Up @@ -71,6 +72,10 @@ public void visitFile(final @NotNull PsiFile file) {
return;
}

// This added to cover case if file exists only in memory.
if (file.getContainingDirectory() == null) {
return;
}
final EventIndex eventIndex = new EventIndex(file.getProject());
final HashMap<String, XmlTag> targetObserversHash = new HashMap<>();

Expand Down Expand Up @@ -108,7 +113,8 @@ public void visitFile(final @NotNull PsiFile file) {
}

final String observerName = observerNameAttribute.getValue();
if (observerName == null) {
if (observerName == null
|| observerNameAttribute.getValueElement() == null) {
continue;
}

Expand Down Expand Up @@ -188,6 +194,11 @@ private List<HashMap<String, String>> fetchModuleNamesWhereSameObserverNameUsed(
final EventIndex eventIndex,
final PsiFile file
) {
if (file.getContainingDirectory() == null) {
throw new NotSupportedException(
"Operation is not supported for files in memory"
);
}
final List<HashMap<String, String>> modulesName = new ArrayList<>();
final String currentFileDirectory = file.getContainingDirectory().toString();
final String currentFileFullPath = currentFileDirectory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private <E extends PhpNamedElement> boolean isValidFqn(final E candidate) {
PhpClass targetClass = null;

if (candidate instanceof Method) {
targetClass = (PhpClass) candidate.getParent();
targetClass = ((Method) candidate).getContainingClass();
} else if (candidate instanceof PhpClass) {
targetClass = (PhpClass) candidate;
}
Expand Down