Skip to content

Commit f168ca2

Browse files
version 1.2.7 for PhpStorm 2022.3 (#38)
1 parent f2fb007 commit f168ca2

12 files changed

Lines changed: 81 additions & 58 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
# Validate wrapper
2020
- name: Gradle Wrapper Validation
21-
uses: gradle/wrapper-validation-action@v1.0.4
21+
uses: gradle/wrapper-validation-action@v1.0.5
2222

2323
# Setup Java 11 environment for the next steps
2424
- name: Setup Java
@@ -43,7 +43,7 @@ jobs:
4343
4444
# Run tests
4545
- name: Run Tests
46-
run: ./gradlew test
46+
run: ./gradlew check
4747

4848
# Cache Plugin Verifier IDEs
4949
- name: Setup Plugin Verifier IDEs Cache

.run/Run Plugin Tests.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</option>
1212
<option name="taskNames">
1313
<list>
14-
<option value="test" />
14+
<option value="check" />
1515
</list>
1616
</option>
1717
<option name="vmOptions" value="" />

CHANGELOG.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,51 @@
22

33
## [Unreleased]
44

5-
## [1.2.6]
5+
## [1.2.7] - 2022-12-12
6+
7+
- adapt code for 2022.3
8+
9+
## [1.2.6] - 2022-08-15
610

711
- adapt code for 2022.2
812
- enabled `PhpMethodOrClassCallIsNotCaseSensitiveInspection` by default
913
- warning level for `PhpMethodOrClassCallIsNotCaseSensitiveInspection` - **error**
1014

11-
## [1.2.5]
15+
## [1.2.5] - 2022-07-12
1216

1317
- support `@kphp-json` tags
1418

15-
## [1.2.4]
19+
## [1.2.4] - 2022-05-23
1620

1721
- support `ffi_scope` and `ffi_cdata` in phpdoc
1822
- track calls to `end()` and `reset()`, suggesting replacing them
1923

20-
## [1.2.3]
24+
## [1.2.3] - 2022-04-25
2125

2226
- adapt code for 2022.1
2327

24-
## [1.2.2]
28+
## [1.2.2] - 2021-12-07
2529

2630
- adapt code for 2021.3
2731

28-
## [1.2.1]
32+
## [1.2.1] - 2021-08-06
2933

3034
- adapt code for 2021.2
3135

32-
## [1.2.0]
36+
## [1.2.0] - 2021-04-21
3337

3438
- adapt code for 2021.1
3539
- `@kphp-tags` added in the past 3 months
3640
- convert `@var` to field hint
3741

38-
## [1.1.0]
42+
## [1.1.0] - 2020-12-04
3943

4044
- better inferring for untyped arrays
4145
- `@kphp-tags` added in the past 3 months
4246
- able to import an undefined class
4347
- `mixed` instead of `var`
4448

45-
## [1.0.0]
49+
## [1.0.0] - 2020-08-02
4650

4751
- custom phpdoc type parsers: support tuple, shape, var, future, arbitrary nesting, nullable types
4852
- patched type inferring supporting tuples and shapes + hack php stdlib inferring

build.gradle.kts

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1+
import org.jetbrains.changelog.Changelog
22

33
fun properties(key: String) = project.findProperty(key).toString()
44

55
plugins {
66
// Kotlin support
7-
id("org.jetbrains.kotlin.jvm") version "1.7.10"
7+
id("org.jetbrains.kotlin.jvm") version "1.7.21"
88
// Gradle IntelliJ Plugin
9-
id("org.jetbrains.intellij") version "1.8.0"
9+
id("org.jetbrains.intellij") version "1.10.0"
1010
// Gradle Changelog Plugin
11-
id("org.jetbrains.changelog") version "1.3.1"
11+
id("org.jetbrains.changelog") version "2.0.0"
12+
// Gradle Kover Plugin
13+
id("org.jetbrains.kotlinx.kover") version "0.6.1"
1214
}
1315

1416
group = properties("pluginGroup")
@@ -19,6 +21,11 @@ repositories {
1921
mavenCentral()
2022
}
2123

24+
// Set the JVM language level used to build project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
25+
kotlin {
26+
jvmToolchain(17)
27+
}
28+
2229
dependencies {
2330
testCompileOnly("junit:junit:4.13.2")
2431
}
@@ -33,23 +40,18 @@ intellij {
3340
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
3441
}
3542

43+
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
3644
changelog {
37-
version.set(properties("pluginVersion"))
3845
groups.set(emptyList())
46+
repositoryUrl.set(properties("pluginRepositoryUrl"))
3947
}
4048

41-
tasks {
42-
// Set the JVM compatibility versions
43-
properties("javaVersion").let {
44-
withType<JavaCompile> {
45-
sourceCompatibility = it
46-
targetCompatibility = it
47-
}
48-
withType<KotlinCompile> {
49-
kotlinOptions.jvmTarget = it
50-
}
51-
}
49+
// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
50+
kover.xmlReport {
51+
onCheck.set(true)
52+
}
5253

54+
tasks {
5355
wrapper {
5456
gradleVersion = properties("gradleVersion")
5557
}
@@ -61,12 +63,23 @@ tasks {
6163

6264
// Get the latest available change notes from the changelog file
6365
changeNotes.set(provider {
64-
changelog.run {
65-
getOrNull(properties("pluginVersion")) ?: getLatest()
66-
}.toHTML()
66+
with(changelog) {
67+
renderItem(
68+
getOrNull(properties("pluginVersion")) ?: getLatest(),
69+
Changelog.OutputType.HTML,
70+
)
71+
}
6772
})
6873
}
6974

75+
runIde {
76+
maxHeapSize = "8g"
77+
}
78+
79+
buildSearchableOptions {
80+
enabled = false
81+
}
82+
7083
test {
7184
exclude("com/vk/kphpstorm/testing/infrastructure/**")
7285
include("**/*Test.class")

gradle.properties

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
# IntelliJ Platform Artifacts Repositories
2-
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
1+
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
32

43
pluginGroup = com.vk
54
pluginName = kphpstorm
5+
pluginRepositoryUrl = https://github.com/VKCOM/kphpstorm
6+
67
# SemVer format -> https://semver.org
7-
pluginVersion = 1.2.6
8+
pluginVersion = 1.2.7
89

9-
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
10-
# for insight into build numbers and IntelliJ Platform versions.
11-
pluginSinceBuild = 222
12-
pluginUntilBuild = 222.*
10+
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
11+
pluginSinceBuild = 223
12+
pluginUntilBuild = 223.*
1313

14-
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
15-
platformType = PS
16-
platformVersion = 2022.2
14+
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
15+
platformType = IU
16+
platformVersion = 2022.3
1717

1818
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1919
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
20-
platformPlugins = com.jetbrains.php:222.3345.135
21-
22-
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
23-
javaVersion = 11
20+
# PHP Plugin - https://plugins.jetbrains.com/plugin/6610-php/versions
21+
platformPlugins = com.jetbrains.php:223.7571.212
2422

2523
# Gradle Releases -> https://github.com/gradle/gradle/releases
26-
gradleVersion = 7.5
24+
gradleVersion = 7.6
2725

28-
# Opt-out flag for bundling Kotlin standard library.
29-
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
26+
# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
3027
# suppress inspection "UnusedProperty"
3128
kotlin.stdlib.default.dependency = false
29+
30+
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
31+
org.gradle.unsafe.configuration-cache = true

gradle/wrapper/gradle-wrapper.jar

818 Bytes
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/kotlin/com/vk/kphpstorm/inspections/KphpParameterTypeMismatchInspection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class KphpParameterTypeMismatchInspection : PhpInspection() {
116116
// 2) allow passing everything to functions with @kphp-infer cast
117117
if (f.docComment != null) {
118118
val tag = KphpInferDocTag.findThisTagInDocComment(f)
119-
if (tag != null && PhpDocUtil.getTagValue(tag).contains("cast"))
119+
if (tag != null && PhpDocUtil.getTagValue(tag, false).contains("cast"))
120120
return false
121121
}
122122

0 commit comments

Comments
 (0)