Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
08d9939
version 1.2.15 for PhpStorm 2025.1
Danil42Russia Jun 1, 2025
c344fbd
first version
Hidanio Jun 26, 2025
e5f2ebd
kphp json tag replace
Hidanio Jun 26, 2025
7a9f3b1
kphp tag warn replaced + fix for json tag
Hidanio Jun 26, 2025
244a3e9
kphp tag template replaced
Hidanio Jun 26, 2025
65e2dce
fixed general test invoke
Hidanio Jul 2, 2025
2584d97
fix build
Danil42Russia Jul 1, 2025
3c7ebf7
changed type to php
Hidanio Jul 10, 2025
6b04fd6
fixed problem with custom tag in psi
Hidanio Jul 11, 2025
96ddfcb
good
Hidanio Jul 16, 2025
b9b0e27
review fix
Hidanio Jul 18, 2025
f15fdcd
ci experiment fix with tests
Hidanio Jul 18, 2025
cebd677
tmp
Danil42Russia Jul 25, 2025
49a84e3
Fixes
vldF Jul 28, 2025
402abd7
remove redundant stubs code
vldF Jul 28, 2025
e488746
return removed comment
vldF Jul 28, 2025
0229e58
remove redundant code
vldF Jul 28, 2025
472e844
sync `build.yml` file with plugin template
vldF Jul 30, 2025
bd12117
fix kphp-json, kphp-template and kphp-warn-performance stubs
vldF Jul 30, 2025
81b3634
sync remaining files with template
vldF Jul 30, 2025
4729f7a
return kover to the project
vldF Jul 30, 2025
84fda2d
minor fix after rebase
vldF Jul 30, 2025
51b041b
update tests after rebase
vldF Jul 30, 2025
f742cc5
update tests
vldF Jul 30, 2025
4a16783
run `free-disk-space` action only on linux
vldF Jul 30, 2025
58c1ed3
fix tests on windows
vldF Jul 30, 2025
a893fab
update gradle to match the template one
vldF Jul 31, 2025
64b594a
up plugin's version
vldF Jul 31, 2025
be417fe
update CHANGELOG.md
vldF Aug 4, 2025
4525e58
update .gitignore
vldF Aug 4, 2025
570ec57
update gradle
vldF Aug 4, 2025
38803c2
ultra fix
Danil42Russia Aug 4, 2025
00ac831
oops
Danil42Russia Aug 4, 2025
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
56 changes: 38 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build

on:
# Trigger the workflow on pushes to only the 'master' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
push:
branches: [ master ]
# Trigger the workflow on any pull request
pull_request:

concurrency:
Expand All @@ -11,30 +12,32 @@ concurrency:

jobs:

# Prepare environment and build the plugin
# Prepare the environment and build the plugin
build:
name: Build
runs-on: ubuntu-latest
outputs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v3

# Set up Java environment for the next steps
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21

# Setup Gradle
- name: Setup Gradle
Expand All @@ -50,8 +53,6 @@ jobs:
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT

echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
Expand All @@ -60,7 +61,7 @@ jobs:
- name: Build plugin
run: ./gradlew buildPlugin

# Run tests
# Run tests and upload a code coverage report
test:
name: Test (${{ matrix.os }})
needs: [ build ]
Expand All @@ -74,20 +75,30 @@ jobs:
- macos-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
if: runner.os == 'Linux'
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

# Run tests
- name: Run Tests
Expand All @@ -98,7 +109,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: tests-result
name: tests-result-${{ matrix.os }}
path: ${{ github.workspace }}/build/reports/tests

# Run plugin structure verification along with IntelliJ Plugin Verifier
Expand All @@ -108,24 +119,33 @@ jobs:
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
run: ./gradlew verifyPlugin

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
build
.DS_Store
out
.kotlin
2 changes: 1 addition & 1 deletion .run/Run Plugin.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
</component>
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## [1.2.16] - 04.08.2025

- Adapt code for PhpStorm 2025.1

## [1.2.15] - 31.07.2025

- introduce an intention to add `@kphp-immutable-class` annotation
Expand Down
19 changes: 15 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ plugins {
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
}

group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("pluginVersion").get()

// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(17)
jvmToolchain(21)
}

// Configure project's dependencies
Expand All @@ -29,6 +30,7 @@ repositories {
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
testImplementation(libs.junit)
testImplementation(libs.opentest4j)

// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
Expand All @@ -40,16 +42,14 @@ dependencies {
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })

instrumentationTools()
pluginVerifier()
zipSigner()
testFramework(TestFrameworkType.Platform)
}
}

// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
name = providers.gradleProperty("pluginName")
version = providers.gradleProperty("pluginVersion")

val changelog = project.changelog // local variable for configuration cache compatibility
Expand Down Expand Up @@ -86,6 +86,17 @@ changelog {
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover {
reports {
total {
xml {
onCheck = true
}
}
}
}

tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ pluginGroup = com.vk
pluginName = kphpstorm
pluginRepositoryUrl = https://github.com/VKCOM/kphpstorm
# SemVer format -> https://semver.org
pluginVersion = 1.2.15
pluginVersion = 1.2.16

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 243
pluginUntilBuild = 243.*
pluginSinceBuild = 251
pluginUntilBuild = 251.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IU
platformVersion = 2024.3
platformType = PS
platformVersion = 2025.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
platformPlugins = com.jetbrains.php:243.21565.211
platformPlugins =
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins = com.intellij.java
platformBundledPlugins = com.jetbrains.php

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.10.2
gradleVersion = 8.14.3

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
Expand Down
10 changes: 7 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
[versions]
# libraries
junit = "4.13.2"
opentest4j = "1.3.0"

# plugins
changelog = "2.2.1"
intelliJPlatform = "2.0.1" # TODO: update this in next update: https://youtrack.jetbrains.com/issue/MP-7019
kotlin = "1.9.25"
changelog = "2.3.0"
intelliJPlatform = "2.7.0"
kotlin = "2.2.0"
kover = "0.9.1"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
opentest4j = { group = "org.opentest4j", name = "opentest4j", version.ref = "opentest4j" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
9 changes: 4 additions & 5 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}

rootProject.name = "kphpstorm"
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import com.jetbrains.php.lang.documentation.phpdoc.parser.tags.PhpDocTagParser
import com.jetbrains.php.lang.parser.PhpParserErrors
import com.jetbrains.php.lang.parser.PhpPsiBuilder
import com.vk.kphpstorm.exphptype.psi.TokensToExPhpTypePsiParsing
import com.vk.kphpstorm.kphptags.psi.KphpDocElementTypes
import com.vk.kphpstorm.kphptags.psi.KphpDocJsonAttributePsiImpl
import com.vk.kphpstorm.kphptags.psi.KphpDocJsonForEncoderPsiImpl
import com.vk.kphpstorm.kphptags.psi.KphpDocTagJsonElementType

class KphpDocTagJsonParser : PhpDocTagParser() {
override fun getElementType() = KphpDocTagJsonElementType
override fun getElementType() = KphpDocElementTypes.kphpDocTagJson

override fun parseContents(builder: PhpPsiBuilder): Boolean {
val paramsTagParser = PhpDocParamTagParser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.vk.kphpstorm.kphptags.parser

import com.jetbrains.php.lang.documentation.phpdoc.parser.tags.PhpDocTagParser
import com.jetbrains.php.lang.parser.PhpPsiBuilder
import com.vk.kphpstorm.kphptags.psi.KphpDocTagSimpleElementType
import com.vk.kphpstorm.kphptags.psi.KphpDocElementTypes

class KphpDocTagSimpleParser : PhpDocTagParser() {
override fun getElementType() = KphpDocTagSimpleElementType
override fun getElementType() = KphpDocElementTypes.kphpDocTagSimple

override fun parseContents(builder: PhpPsiBuilder) = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import com.jetbrains.php.lang.documentation.phpdoc.lexer.PhpDocTokenTypes
import com.jetbrains.php.lang.documentation.phpdoc.parser.tags.PhpDocTagParser
import com.jetbrains.php.lang.parser.PhpParserErrors
import com.jetbrains.php.lang.parser.PhpPsiBuilder
import com.vk.kphpstorm.kphptags.psi.KphpDocTagTemplateClassElementType
import com.vk.kphpstorm.kphptags.psi.KphpDocElementTypes
import com.vk.kphpstorm.kphptags.psi.KphpDocTplParameterDeclPsiImpl

class KphpDocTagTemplateClassParser : PhpDocTagParser() {
override fun getElementType() = KphpDocTagTemplateClassElementType
override fun getElementType() = KphpDocElementTypes.kphpDocTagTemplateClass

override fun parseContents(builder: PhpPsiBuilder): Boolean {
do {
Expand Down
Loading
Loading