Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'adopt'
java-version: '25'
distribution: 'temurin'

# Cache Gradle dependencies
- name: Setup Gradle Dependencies Cache
Expand All @@ -48,4 +48,4 @@ jobs:
# env:
# ORG_GRADLE_PROJECT_platformPlugins: "java,webDeployment,com.jetbrains.php:223.8617.59,de.espend.idea.php.toolbox:6.1.0"
# ORG_GRADLE_PROJECT_platformVersion: "2022.3.2"
# run: ./gradlew check verifyPlugin buildPlugin
# run: ./gradlew check verifyPlugin buildPlugin
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ fun properties(key: String) = project.findProperty(key).toString()

plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "2.3.20"
id("org.jetbrains.intellij.platform") version "2.14.0"
id("org.jetbrains.intellij.platform") version "2.18.1"
id("org.jetbrains.changelog") version "2.5.0"
kotlin("jvm")
}

group = properties("pluginGroup")
Expand Down Expand Up @@ -95,7 +95,6 @@ tasks {
patchPluginXml {
version = properties("pluginVersion")
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))
changeNotes.set(file("src/main/resources/META-INF/change-notes.html").readText().replace("<html>", "").replace("</html>", ""))
}

Expand All @@ -116,3 +115,7 @@ tasks {
}
}
}

kotlin {
jvmToolchain(25)
}
11 changes: 5 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,21 @@ pluginVersion = 12.1.0

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 252
pluginUntilBuild = 299.*
pluginSinceBuild = 262

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IU
platformVersion = 2026.1
platformVersion = 2026.2

# Java language level used to compile sources and to generate the files for
javaVersion = 21
javaVersion = 25

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 9.4.1
gradleVersion = 9.6.1

# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
# suppress inspection "UnusedProperty"
kotlin.stdlib.default.dependency = false

org.gradle.configuration-cache=true
org.gradle.configuration-cache=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions gradlew

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

35 changes: 12 additions & 23 deletions gradlew.bat

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

10 changes: 10 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
pluginManagement {
plugins {
kotlin("jvm") version "2.4.10"
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}

rootProject.name = "PHP Annotations"
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@
*/
public abstract class AnnotationLightCodeInsightFixtureTestCase extends LightJavaCodeInsightFixtureTestCase {

// These external inspections are incompatible with the legacy light-test traversal below.
private static final Set<String> UNSUPPORTED_LIGHT_TEST_INSPECTIONS = Set.of(
"com.intellij.clouds.docker.gateway.json.inspections.DevcontainerFolderInspection",
"com.intellij.lang.javascript.inspections.JSInspection",
"org.editorconfig.language.codeinsight.inspections.EditorConfigVerifyByCoreInspection",
"org.jetbrains.qodana.staticAnalysis.inspections.sanity.QodanaSanity"
);

@Override
public void setUp() throws Exception {
super.setUp();
Expand Down Expand Up @@ -496,6 +504,21 @@ private Pair<List<ProblemDescriptor>, Integer> getLocalInspectionsAtCaret(@NotNu
continue;
}

Class<?> inspectionClass = object.getClass();
boolean unsupportedInspection = false;
while(inspectionClass != null) {
if(UNSUPPORTED_LIGHT_TEST_INSPECTIONS.contains(inspectionClass.getName())) {
unsupportedInspection = true;
break;
}

inspectionClass = inspectionClass.getSuperclass();
}

if(unsupportedInspection) {
continue;
}

final PsiElementVisitor psiElementVisitor = ((LocalInspectionTool) object).buildVisitor(problemsHolder, false);

psiFile.acceptChildren(new PsiRecursiveElementVisitor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public String getTestDataPath() {

public void testThatThatEntityClassIsGeneratedForAnnotations() {
myFixture.configureByText(PhpFileType.INSTANCE, "<?php\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"class Foobar\n" +
"{\n" +
Expand All @@ -34,6 +39,11 @@ public void testThatThatEntityClassIsGeneratedForAnnotations() {
"use Doctrine\\ORM\\Mapping as ORM;\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"/**\n" +
" * @ORM\\Entity\n" +
" * @ORM\\Table(name=\"foobar\")\n" +
" */\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public String getTestDataPath() {

public void testThatThatEmbeddableClassIsGeneratedForAnnotations() {
myFixture.configureByText(PhpFileType.INSTANCE, "<?php\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"class Foobar\n" +
"{\n" +
Expand All @@ -33,6 +38,11 @@ public void testThatThatEmbeddableClassIsGeneratedForAnnotations() {
"use Doctrine\\ORM\\Mapping as ORM;\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"/**\n" +
" * @ORM\\Embeddable\n" +
" */\n" +
"class Foobar\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ final class Column
{
}

/**
* @Annotation
*/
class Entity
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public void testThatAddDoctrineColumnIsAvailable() {

public void testThatAddDoctrineColumnIsAvailableIsInvokedWithResult() {
myFixture.configureByText(PhpFileType.INSTANCE, "<?php\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"class Foobar\n" +
"{\n" +
Expand All @@ -43,6 +48,11 @@ public void testThatAddDoctrineColumnIsAvailableIsInvokedWithResult() {
"\n" +
"use Doctrine\\ORM\\Mapping as ORM;\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"class Foobar\n" +
"{\n" +
" /**\n" +
Expand All @@ -56,6 +66,11 @@ public void testThatAddDoctrineColumnIsAvailableIsInvokedWithResult() {

public void testThatAddDoctrineColumnIsAvailableIsInvokedWithResultForNullable() {
myFixture.configureByText(PhpFileType.INSTANCE, "<?php\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"class Foobar\n" +
"{\n" +
Expand All @@ -69,6 +84,11 @@ public void testThatAddDoctrineColumnIsAvailableIsInvokedWithResultForNullable()
"\n" +
"use Doctrine\\ORM\\Mapping as ORM;\n" +
"\n" +
"/**\n" +
" * @\\Doctrine\\ORM\\Mapping\\Entity\n" +
" */\n" +
"class Existing {}\n" +
"\n" +
"class Foobar\n" +
"{\n" +
" /**\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ final class Column
{
}

/**
* @Annotation
*/
class Entity
{
}
Expand All @@ -22,4 +25,4 @@ class Entity
namespace App\Entity\Repository
{
class UserRepository {}
}
}
Loading