From 3a8b981e863367004453b421ca628ce2d5ec83ea Mon Sep 17 00:00:00 2001 From: Louis de Looze Date: Mon, 14 Oct 2024 09:00:17 +0200 Subject: [PATCH 1/5] Update RegExUtil.java Updating theme regex to support dashes. --- src/com/magento/idea/magento2plugin/util/RegExUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/magento/idea/magento2plugin/util/RegExUtil.java b/src/com/magento/idea/magento2plugin/util/RegExUtil.java index 194ca170a..80d0dedfe 100644 --- a/src/com/magento/idea/magento2plugin/util/RegExUtil.java +++ b/src/com/magento/idea/magento2plugin/util/RegExUtil.java @@ -64,7 +64,7 @@ public static class Magento { = "[A-Z][a-zA-Z0-9]+_[A-Z][a-zA-Z0-9]+"; public static final String THEME_NAME - = "[a-z]+/[A-Z][a-zA-Z0-9_]+/[a-z][a-zA-Z0-9_]+"; + = "[a-z]+/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+"; public static final String MFTF_CURLY_BRACES = ".*\\{\\{[^\\}]+\\}\\}.*"; From d9aff19820c44e3d2ac4f60e58bd516d310c39e2 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Tue, 15 Oct 2024 19:54:49 +0300 Subject: [PATCH 2/5] 5.3.1 initial --- CHANGELOG.md | 6 ++++++ README.md | 2 +- build.gradle | 2 +- resources/META-INF/plugin.xml | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff17f938f..114b4696d 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). +## 5.3.1 + +### Fixed + +- Custom theme couldn't be detected [#2348](https://github.com/magento/magento2-phpstorm-plugin/pull/2348) + ## 5.3.0 ### Added diff --git a/README.md b/README.md index 3abc7f78d..387d14061 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ 1. Check out this repository 1. Open a folder with the project in the IntelliJ Ultimate using the `open` action button. -1. Make sure that you on the latest develop branch (e.g `5.3.0-develop`) +1. Make sure that you on the latest develop branch (e.g `5.3.1-develop`) 1. Right-click on the `build.gradle` file, choose "Import Gradle project" (if this is not exist look for "Build module ''") (you need to have Gradle plugin installed) 1. Check if the right SDK version is used for the project. - Current Java version for the project is **java 11**, so you should additionally download **SDK 11** and choose it in the module settings: `Right click by the project root > Open Module Settings > Project Settings > Project > Project SDK` diff --git a/build.gradle b/build.gradle index dd12551e4..222538eaa 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ repositories { } group 'com.magento.idea' -version '5.3.0' +version '5.3.1' apply plugin: 'org.jetbrains.intellij' apply plugin: 'java' diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index db3b1e1fb..9bde630cb 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -7,7 +7,7 @@ com.magento.idea.magento2plugin Magento PhpStorm - 5.3.0 + 5.3.1 Magento Inc. Date: Wed, 16 Oct 2024 10:37:40 +0200 Subject: [PATCH 3/5] Updating theme regex to support dashes. --- src/com/magento/idea/magento2plugin/util/RegExUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/magento/idea/magento2plugin/util/RegExUtil.java b/src/com/magento/idea/magento2plugin/util/RegExUtil.java index 194ca170a..80d0dedfe 100644 --- a/src/com/magento/idea/magento2plugin/util/RegExUtil.java +++ b/src/com/magento/idea/magento2plugin/util/RegExUtil.java @@ -64,7 +64,7 @@ public static class Magento { = "[A-Z][a-zA-Z0-9]+_[A-Z][a-zA-Z0-9]+"; public static final String THEME_NAME - = "[a-z]+/[A-Z][a-zA-Z0-9_]+/[a-z][a-zA-Z0-9_]+"; + = "[a-z]+/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+"; public static final String MFTF_CURLY_BRACES = ".*\\{\\{[^\\}]+\\}\\}.*"; From bc70b5251ed12ef694ff9c7024f5eb36cf47c42e Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sun, 20 Oct 2024 17:06:02 +0300 Subject: [PATCH 4/5] Updated intellijPlatform plugin to fix tests --- build.gradle | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/build.gradle b/build.gradle index 13f3f61bf..8dd400f41 100644 --- a/build.gradle +++ b/build.gradle @@ -2,9 +2,10 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +import org.jetbrains.intellij.platform.gradle.TestFrameworkType plugins { - id 'org.jetbrains.intellij' version '1.17.3' + id "org.jetbrains.intellij.platform" version "2.1.0" id 'checkstyle' id 'pmd' id 'org.jetbrains.changelog' version '2.2.0' @@ -12,12 +13,17 @@ plugins { repositories { mavenCentral() + + intellijPlatform { + defaultRepositories() + marketplace() + } } group 'com.magento.idea' version '5.4.0' -apply plugin: 'org.jetbrains.intellij' +apply plugin: 'org.jetbrains.intellij.platform' apply plugin: 'java' apply plugin: 'idea' apply plugin: 'groovy' @@ -32,25 +38,9 @@ java { targetCompatibility = javaVersion } -intellij { +intellijPlatform { version = ideaVersion - type = 'IU' - pluginName = 'com.magento.idea.magento2plugin' - plugins = [ - "com.jetbrains.php:$phpPluginVersion", - 'yaml', - 'java-i18n', - 'properties', - 'com.intellij.css', - 'JavaScript', - 'com.intellij.lang.jsgraphql:242.20224.155', - 'platform-images', - 'copyright' - ] - updateSinceUntilBuild = false - sameSinceUntilBuild = false - downloadSources = !Boolean.valueOf(System.getenv('CI')) - sandboxDir = "${project.rootDir}/.idea-sandbox" + projectName = 'com.magento.idea.magento2plugin' patchPluginXml { changeNotes = provider { changelog.getLatest().toHTML() } @@ -114,6 +104,17 @@ dependencies { testRuntimeOnly('org.junit.vintage:junit-vintage-engine:5.9.0') testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.9.0") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.00") + + intellijPlatform { + intellijIdeaUltimate '2024.2.3' + plugin("com.jetbrains.php", phpPluginVersion) + plugin("com.intellij.lang.jsgraphql", "242.20224.155") + bundledPlugin "JavaScript" + instrumentationTools() + bundledPlugin 'com.intellij.java' + + testFramework TestFrameworkType.Platform.INSTANCE + } } test { From 51dec50ef2470cd5e0e673da2914213d139f8260 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sun, 20 Oct 2024 17:31:00 +0300 Subject: [PATCH 5/5] Update build.gradle to configure plugin properties Replaced patchPluginXml with pluginConfiguration. Added id, name, version, and description properties for better clarity and management of the plugin configuration. --- build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 8dd400f41..eed1a946d 100644 --- a/build.gradle +++ b/build.gradle @@ -42,8 +42,12 @@ intellijPlatform { version = ideaVersion projectName = 'com.magento.idea.magento2plugin' - patchPluginXml { - changeNotes = provider { changelog.getLatest().toHTML() } + pluginConfiguration { + id = 'com.magento.idea.magento2plugin' + name = 'Magento PhpStorm' + version = '5.4.0' + description = 'This is a PhpStorm IDE plugin for a better Magento 2 development workflow.' + changeNotes = provider { changelog.getLatest().toHTML() } as Provider } }