From ad283343d457fcedd391fb015070cdd6d4661b05 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Sep 2026 19:31:48 +0000 Subject: [PATCH 1/5] Initial plan From 14699b55533195e8cbf373de68837786d50bc3fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:51:27 +0000 Subject: [PATCH 2/5] Bump wrapper to latest compatible Gradle 8 Co-authored-by: funivan <425208+funivan@users.noreply.github.com> --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3a02907..1669a50 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From a0b7cf5973113939ac4bf12a6dcb9dcd8021ae84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Sep 2026 15:42:32 +0000 Subject: [PATCH 3/5] Migrate build for latest Gradle and JVM Co-authored-by: funivan <425208+funivan@users.noreply.github.com> --- .github/workflows/release.yaml | 3 +- .github/workflows/test.yaml | 3 +- build.gradle.kts | 104 ++++++++++++----------- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 60 insertions(+), 52 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f4a5f0c..e270c1e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,7 +12,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: - java-version: 11 + distribution: temurin + java-version: 25 - name: Save plugin version and type to ENV run: | echo "PLUGIN_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6e5c810..16a0e95 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: - java-version: 11 + distribution: temurin + java-version: 25 - uses: burrunan/gradle-cache-action@v1.5 with: diff --git a/build.gradle.kts b/build.gradle.kts index ef29754..9f607df 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,54 +1,80 @@ +import org.jetbrains.intellij.platform.gradle.TestFrameworkType +import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("java") id("org.jetbrains.kotlin.jvm") version "2.1.10" - id("org.jetbrains.intellij") version "1.17.4" + id("org.jetbrains.intellij.platform") version "2.16.0" id("org.jetbrains.changelog") version "2.2.1" // ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle // id("org.jlleitschuh.gradle.ktlint") version "10.1.0" } fun properties(key: String) = project.findProperty(key).toString() -// Import variables from gradle.properties file -val pluginGroup: String by project -// `pluginName_` variable ends with `_` because of the collision with Kotlin magic getter in the `intellij` closure. -// Read more about the issue: https://github.com/JetBrains/intellij-platform-plugin-template/issues/29 -val pluginName_: String by project -val pluginVersion: String by project -val pluginSinceBuild: String by project -val pluginVerifierIdeVersions: String by project -val intellijPublishChannel: String by project -val intellijPublishToken: String by project - -val platformType: String by project -val platformVersion: String by project -val platformPlugins: String by project -val platformDownloadSources: String by project +val pluginGroup = properties("pluginGroup") +val pluginName_ = properties("pluginName_") +val pluginVersion = properties("pluginVersion") +val pluginSinceBuild = properties("pluginSinceBuild") +val pluginVerifierIdeVersions = properties("pluginVerifierIdeVersions") +val intellijPublishChannel = properties("intellijPublishChannel") +val intellijPublishToken = properties("intellijPublishToken") + +val platformType = properties("platformType") +val platformVersion = properties("platformVersion") +val platformPlugins = properties("platformPlugins") group = pluginGroup version = pluginVersion println("version: $version") -// Configure project's dependencies repositories { mavenCentral() + intellijPlatform { + defaultRepositories() + } } -// Configure gradle-intellij-plugin plugin. -// Read more: https://github.com/JetBrains/gradle-intellij-plugin -intellij { - pluginName.set(pluginName_) - version.set(platformVersion) - type.set(platformType) - downloadSources.set(platformDownloadSources.toBoolean()) - updateSinceUntilBuild.set(true) - // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file. - plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) +intellijPlatform { + buildSearchableOptions = false + pluginConfiguration { + name = pluginName_ + version = pluginVersion + ideaVersion { + sinceBuild = pluginSinceBuild + } + } + publishing { + token = intellijPublishToken + channels = listOf(intellijPublishChannel, "default").filter(String::isNotEmpty).take(1) + } + pluginVerification { + ides { + create(platformType, pluginVerifierIdeVersions) { + useInstaller = true + } + } + } } + dependencies { testImplementation(gradleTestKit()) testImplementation(kotlin("test")) testImplementation(kotlin("test-junit")) + intellijPlatform { + create(platformType, platformVersion) + testFramework(TestFrameworkType.Platform) + platformPlugins + .split(',') + .map(String::trim) + .filter(String::isNotEmpty) + .forEach { + if (it.contains(':')) { + plugin(it) + } else { + bundledPlugin(it) + } + } + } } // Read more: https://github.com/JetBrains/gradle-changelog-plugin @@ -63,29 +89,10 @@ tasks { targetCompatibility = it } withType { - kotlinOptions.jvmTarget = it + compilerOptions.jvmTarget.set(JvmTarget.fromTarget(it)) } } - publishPlugin { - token.set(intellijPublishToken) - channels.set(listOf(intellijPublishChannel, "default").filter(String::isNotEmpty).take(1)) - } - patchPluginXml { - version.set(pluginVersion) - sinceBuild.set(pluginSinceBuild) - changeNotes.set( - changelog.getLatest().toHTML() - ) - } - - runPluginVerifier { - ideVersions.set( - properties("pluginVerifierIdeVersions") - .split(',').map(String::trim).filter(String::isNotEmpty) - ) - } - register("copyInspections") { doLast { inspections().forEach { @@ -125,11 +132,10 @@ tasks { // Network-sensitive tasks: run ONLY when not in --offline mode // You'll probaly need to prime your caches during an online phase, using a command such as: // ./gradlew help --refresh-dependencies --no-daemon - matching { name in listOf("publishPlugin", "runPluginVerifier") }.configureEach { + matching { name in listOf("publishPlugin", "verifyPlugin") }.configureEach { onlyIf { !gradle.startParameter.isOffline } } } -tasks.getByName("buildSearchableOptions").onlyIf { false } // Custom functions fun write(file: File, content: String): Boolean { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1669a50..a9cef91 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 64c3a8a6077db40bc1741498af2820439623d47b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Sep 2026 18:32:03 +0000 Subject: [PATCH 4/5] Fix PSI operator type access Co-authored-by: funivan <425208+funivan@users.noreply.github.com> --- .../phpClean/inspections/toStringCall/IsToStringContext.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/funivan/idea/phpClean/inspections/toStringCall/IsToStringContext.kt b/src/main/kotlin/com/funivan/idea/phpClean/inspections/toStringCall/IsToStringContext.kt index 9cb731f..3325341 100644 --- a/src/main/kotlin/com/funivan/idea/phpClean/inspections/toStringCall/IsToStringContext.kt +++ b/src/main/kotlin/com/funivan/idea/phpClean/inspections/toStringCall/IsToStringContext.kt @@ -11,10 +11,10 @@ class IsToStringContext : ConstrainInterface { return (target is PhpEchoStatement) || (target is PhpPrintExpression) || (target is ConcatenationExpression) - || (target is UnaryExpression && target.operation?.node?.elementType == PhpTokenTypes.opSTRING_CAST) + || (target is UnaryExpression && target.operationType == PhpTokenTypes.opSTRING_CAST) || ( target is BinaryExpression - && target.operation?.node?.elementType == PhpTokenTypes.opEQUAL + && target.operationType == PhpTokenTypes.opEQUAL && (target.leftOperand is StringLiteralExpression || target.rightOperand is StringLiteralExpression) ) } From d64f34ed729c38642c0ca97955f3f0a6c844524f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Sep 2026 19:45:48 +0000 Subject: [PATCH 5/5] Fix IntelliJ platform dependency declaration in Gradle build Co-authored-by: funivan <425208+funivan@users.noreply.github.com> --- build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9f607df..6608b0e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -61,7 +61,11 @@ dependencies { testImplementation(kotlin("test")) testImplementation(kotlin("test-junit")) intellijPlatform { - create(platformType, platformVersion) + when (platformType) { + "IU" -> intellijIdeaUltimate(platformVersion) + "IC" -> intellijIdeaCommunity(platformVersion) + else -> create(platformType, platformVersion) + } testFramework(TestFrameworkType.Platform) platformPlugins .split(',')