From ccc3396f7ac026fad48d517acb1c013718c20faf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Sep 2026 09:29:24 +0000 Subject: [PATCH 1/4] Update CI JVM and restore compatible Gradle Co-authored-by: funivan <425208+funivan@users.noreply.github.com> --- .github/workflows/release.yaml | 5 +++-- .github/workflows/test.yaml | 5 +++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f4a5f0c..19804f0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,9 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v5 with: - java-version: 11 + distribution: temurin + java-version: 17 - 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..c51acc8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,9 +9,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v5 with: - java-version: 11 + distribution: temurin + java-version: 17 - uses: burrunan/gradle-cache-action@v1.5 with: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a9cef91..3a02907 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-9.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From aa9c0a34ee715980ff25203b7a7334d400626011 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/4] 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 13d90e610331d8a156ae6e5e5e65ac9a42e7c73d 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/4] Migrate build for latest Gradle and JVM Co-authored-by: funivan <425208+funivan@users.noreply.github.com> --- .github/workflows/release.yaml | 2 +- .github/workflows/test.yaml | 2 +- build.gradle.kts | 104 ++++++++++++----------- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 58 insertions(+), 52 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 19804f0..ded0d07 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-java@v5 with: distribution: temurin - java-version: 17 + 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 c51acc8..9df4c14 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-java@v5 with: distribution: temurin - java-version: 17 + 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 e8d4c9b814adbefc6e33e97c4be0fffe94f3ff59 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/4] 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) ) }