Skip to content

2025.1 build #2425

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
merged 1 commit into from
Apr 17, 2025
Merged
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@ Changelog
=========

# Version names
* 2024.x: PhpStorm 2024.1+
* 2025.x: PhpStorm 2025.1+
* 2024.x: PhpStorm 2024.1+ (no support)
* 2023.x: PhpStorm 2023.1+ (no support)
* 2022.x: PhpStorm 2022.1+ (no support)
* 0.23.x: PhpStorm 2021.1+ (no support)
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ pluginGroup = fr.adrienbrault.idea.symfony2plugin
pluginName = Symfony Plugin

# SemVer format -> https://semver.org
pluginVersion = 2022.1.264
pluginVersion = 2025.1.264

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
@@ -15,11 +15,11 @@ pluginUntilBuild =

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IU
platformVersion = 2024.3.5
platformVersion = 2025.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = com.jetbrains.php:243.26053.27,de.espend.idea.php.annotation:11.1.1,de.espend.idea.php.toolbox:6.1.0,com.jetbrains.twig:243.26053.20,com.jetbrains.php.dql:243.21565.129
platformPlugins = com.jetbrains.php:251.23774.318,de.espend.idea.php.annotation:12.0.0,de.espend.idea.php.toolbox:6.1.0,com.jetbrains.twig:251.23774.318,com.jetbrains.php.dql:251.23774.318
platformBundledPlugins = com.intellij.java,com.jetbrains.plugins.webDeployment,org.jetbrains.plugins.yaml,JavaScript

# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
Original file line number Diff line number Diff line change
@@ -809,7 +809,7 @@ private static int getArgumentIndexByCount(@NotNull XmlTag xmlTag) {
* <service class="Foobar"></service>
*/
public static PsiElementPattern.Capture<PsiElement> getXmlTagNameLeafStartPattern() {
return PlatformPatterns.psiElement(XmlElementType.XML_NAME)
return PlatformPatterns.psiElement(XmlTokenType.XML_NAME)
.afterLeaf(PlatformPatterns.psiElement(XmlTokenType.XML_START_TAG_START))
.withParent(XmlTag.class);
}
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import com.intellij.util.ProcessingContext;
import com.intellij.util.containers.ContainerUtil;
import fr.adrienbrault.idea.symfony2plugin.Symfony2Icons;
import fr.adrienbrault.idea.symfony2plugin.Symfony2ProjectComponent;
import fr.adrienbrault.idea.symfony2plugin.util.ProjectUtil;
@@ -32,10 +31,7 @@
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@@ -71,15 +67,15 @@ protected void addCompletions(@NotNull CompletionParameters completionParameters
}

// get all parent yaml keys
List<String> items = YamlHelper.getParentArrayKeys(element);
if(items.isEmpty()) {
List<String> itemsRaw = YamlHelper.getParentArrayKeys(element);
if(itemsRaw.isEmpty()) {
return;
}

// normalize for xml
items = ContainerUtil.map(items, s -> s.replace('_', '-'));
List<String> items = new ArrayList<>(itemsRaw.stream().map(s -> s.replace('_', '-')).toList());

// reverse to get top most item first
// reverse to get the top most item first
Collections.reverse(items);

Document document = getConfigTemplate(ProjectUtil.getProjectDir(element));
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@
import org.jetbrains.yaml.psi.YAMLKeyValue;
import org.jetbrains.yaml.psi.YAMLMapping;

import java.util.ArrayList;
import java.util.Collection;

/**
@@ -103,7 +104,7 @@ private void visitPhp(@NotNull StringLiteralExpression element) {
String contents = element.getContents();

for (Method ownMethod : method.getContainingClass().getOwnMethods()) {
Collection<PhpAttribute> attributes = ownMethod.getAttributes("\\Symfony\\Component\\Routing\\Annotation\\Route");
Collection<PhpAttribute> attributes = new ArrayList<>(ownMethod.getAttributes("\\Symfony\\Component\\Routing\\Annotation\\Route"));
attributes.addAll(ownMethod.getAttributes("\\Symfony\\Component\\Routing\\Attribute\\Route"));

for (PhpAttribute attribute : attributes) {