Skip to content

Commit aa05507

Browse files
authored
chore: fix deprecations (#38)
fix deprecations and replace travis with github workflows
1 parent ce8cd97 commit aa05507

File tree

9 files changed

+70
-23
lines changed

9 files changed

+70
-23
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Add release asset
2+
3+
on:
4+
release:
5+
6+
jobs:
7+
add-release-asset:
8+
runs-on: ubuntu-18.04
9+
10+
steps:
11+
- name: check out sources
12+
uses: actions/checkout@v2
13+
- name: install fonts
14+
run: sudo apt-get update -y && sudo apt-get install -y fonts-dejavu fontconfig
15+
- name: setup java
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: '8'
19+
- name: build asset
20+
uses: eskatos/[email protected]
21+
with:
22+
arguments: build
23+
- name: fetch latest release
24+
id: fetch_release
25+
uses: thebritican/[email protected]
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
- name: calculate asset name
29+
id: vars
30+
run: |
31+
TAG_NAME=${{ steps.fetch_release.outputs.tag_name }}
32+
echo ::set-output name=asset_name::Quick Mock-${TAG_NAME:1}.zip
33+
- name: upload release asset
34+
uses: actions/[email protected]
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
with:
38+
upload_url: ${{ steps.fetch_release.outputs.upload_url }}
39+
asset_path: build/distributions/${{ steps.vars.outputs.asset_name }}
40+
asset_name: TEST-${{ steps.vars.outputs.asset_name }}
41+
asset_content_type: application/zip

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test plugin
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test-plugin:
8+
runs-on: ubuntu-18.04
9+
10+
steps:
11+
- name: check out sources
12+
uses: actions/checkout@v2
13+
- name: install fonts
14+
run: sudo apt-get update -y && sudo apt-get install -y fonts-dejavu fontconfig
15+
- name: setup java
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: '8'
19+
- name: test plugin
20+
uses: eskatos/[email protected]
21+
with:
22+
arguments: :cleanTest :test check verifyPlugin

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ repositories {
2222
}
2323

2424
dependencies {
25-
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
25+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
2626
compileOnly fileTree(dir: 'lib', include: ['*.jar'])
27-
testCompile group: 'junit', name: 'junit', version: '4.12'
27+
testImplementation group: 'junit', name: 'junit', version: '4.12'
2828
}
2929

3030
compileKotlin {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
releaseVersion = 1.3.3
2-
ideaVersion = 201.6668.121
3-
phpPluginVersion = 201.6668.153
2+
ideaVersion = 202.8194.7
3+
phpPluginVersion = 202.8194.11

lib/php-openapi.jar

100644100755
76.2 KB
Binary file not shown.

lib/php.jar

100644100755
8.1 MB
Binary file not shown.

src/main/kotlin/de/cawolf/quickmock/intention/service/AddMissingUseStatements.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.intellij.openapi.components.ServiceManager
44
import com.intellij.openapi.project.Project
55
import com.intellij.psi.PsiElement
66
import com.jetbrains.php.codeInsight.PhpCodeInsightUtil
7+
import com.jetbrains.php.lang.psi.PhpGroupUseElement.PhpUseKeyword
78
import com.jetbrains.php.refactoring.PhpAliasImporter
89
import de.cawolf.quickmock.intention.PRIMITIVES
910

@@ -14,7 +15,7 @@ class AddMissingUseStatements {
1415
if (PRIMITIVES.contains(foldDocBlockTypeHintedArray.invoke(fqcn))) return false
1516

1617
val scopeHolder = PhpCodeInsightUtil.findScopeForUseOperator(namespace)
17-
if (scopeHolder != null && PhpCodeInsightUtil.alreadyImported(scopeHolder, fqcn) == null && PhpCodeInsightUtil.canImport(scopeHolder, fqcn)) {
18+
if (scopeHolder != null && PhpCodeInsightUtil.findImportedName(scopeHolder, fqcn, PhpUseKeyword.CLASS) == null && PhpCodeInsightUtil.canImport(scopeHolder, fqcn, PhpUseKeyword.CLASS)) {
1819
PhpAliasImporter.insertUseStatement(fqcn, alias, scopeHolder)
1920
}
2021
return true

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</dl
4242
]]></change-notes>
4343

44-
<idea-version since-build="201.6668" />
44+
<idea-version since-build="202.8194" />
4545

4646
<extensions defaultExtensionNs="com.intellij">
4747
<intentionAction>

0 commit comments

Comments
 (0)