Skip to content

Commit 2975542

Browse files
authored
Merge pull request #9 from maliboot/2025.1.x
2025.1.x
2 parents 330b398 + 1f93893 commit 2975542

8 files changed

Lines changed: 57 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
# Changelog
44
<hr>
55

6+
## [2.1.0] - 2025-05-01
7+
### Added
8+
- Nothing
9+
10+
### Removed
11+
- 去除旧版本不兼容api相应的功能
12+
13+
### Changed
14+
- 适配PHPStorm-251.*
15+
<hr>
16+
617
## [1.1.2] - 2025-04-30
718
### Added
819
- 添加框架创建骨架

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ This is a PHPStorm plugin that provides support for the hyperf framework/compone
2626
* 重复类声明:当AOP类产生代理文件,屏蔽重复类声明的异常报错。如`App_User.proxy.php 处存在类 'User' 的其他声明`错误将不再显示
2727
* 拼写检查:屏蔽框架常用词如`hyperf``swoole``jsonrpc`等等单词的拼写错误警告。如有遗漏或补充,请提交Issue给我。
2828

29+
## 项目创建向导
30+
![Skeleton Preview](doc/skeleton.png)
31+
* 支持像创建`Symfony`项目一样,创建`Hyperf`项目。
32+
* 提供多版本的`Hyperf`骨架版本选择
33+
2934
## debug
30-
`swoole`官网提到,在版本`5.1`以上支持了`xdebug`调试,所以做了这样一个功能
35+
`swoole`官网提到,在版本`5.1`以上支持了`xdebug`调试,所以做了这样一个功能。此功能主要是为了解决`Hyperf`调试时,断点跳到代理文件内的问题。
3136
> 调试准备,php.ini中修改:
3237
>
3338
> swoole.enable_fiber_mock=On
@@ -39,7 +44,7 @@ This is a PHPStorm plugin that provides support for the hyperf framework/compone
3944
## Lombok‼️(**该功能完全不依赖`代理文件`**
4045
![Debug Preview](doc/lombok.gif)
4146
* Lombok支持:[maliboot/lombok](https://github.com/maliboot/lombok)适配,解决该PHP扩展使用时编辑器没有自动补全、参数提示、错误语法高量、导航等功能。
42-
* **该功能完全不依赖`代理文件`**。通过构建了相应的`FakePhpPsiElement`元素, 旨在极端情况下,提供对[maliboot/lombok](https://github.com/maliboot/lombok)的全方位支持
47+
* **该功能完全不依赖`代理文件`**。通过构建了相应的`FakePhpPsiElement`元素, 旨在极端情况下(如项目没有热启动,无法更新代理文件时),提供对[maliboot/lombok](https://github.com/maliboot/lombok)的全方位支持
4348

4449
# Idea
4550
* 如果使用插件过程中有报错,可以[提交堆栈报告](https://github.com/maliboot/idea-hyperf-plugin/issues/new?title=[BUG]XXX主题&body=...)给我。这对我非常重要,我会及时修复

build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import org.jetbrains.changelog.Changelog
22
import org.jetbrains.changelog.markdownToHTML
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34

45
plugins {
56
id("java")
@@ -91,6 +92,15 @@ changelog {
9192
}
9293

9394
tasks {
95+
// Set the JVM compatibility versions
96+
withType<JavaCompile> {
97+
sourceCompatibility = providers.gradleProperty("javaVersion").get()
98+
targetCompatibility = providers.gradleProperty("javaVersion").get()
99+
}
100+
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
101+
compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
102+
}
103+
94104
wrapper {
95105
gradleVersion = providers.gradleProperty("gradleVersion").get()
96106
}

doc/skeleton.png

834 KB
Loading

gradle.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
pluginGroup = io.maliboot.devkit
22
pluginName = Hyperf Booster
3-
pluginVersion = 1.1.2
3+
# x/y/z->2025/1/x
4+
pluginVersion = 2.1.0
45
pluginRepositoryUrl = https://github.com/maliboot/idea-hyperf-plugin
56

6-
pluginSinceBuild = 243.21565.202
7-
pluginUntilBuild = 243.26053.13
7+
pluginSinceBuild = 251.23774.466
8+
pluginUntilBuild = 251.25410.64
89

910
platformType = PS
10-
platformVersion = 2024.3.5
11+
platformVersion = 2025.1.0.1
1112
platformPlugins =
1213
platformBundledPlugins = com.jetbrains.php
1314

src/main/java/io/maliboot/devkit/idea/hyperf/skeleton/php/ProjectSpecificSettingsStep.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
package io.maliboot.devkit.idea.hyperf.skeleton.php;
22

3+
import com.intellij.ide.IdeCoreBundle;
34
import com.intellij.ide.impl.ProjectUtil;
45
import com.intellij.ide.util.projectWizard.AbstractNewProjectStep;
6+
import com.intellij.ide.util.projectWizard.ProjectSettingsStepBase;
57
import com.intellij.ide.util.projectWizard.WebProjectSettingsStepWrapper;
68
import com.intellij.ide.util.projectWizard.WebProjectTemplate;
9+
import com.intellij.lang.javascript.boilerplate.AbstractGithubTagDownloadedProjectGenerator;
710
import com.intellij.openapi.ui.LabeledComponent;
811
import com.intellij.openapi.ui.VerticalFlowLayout;
912
import com.intellij.openapi.util.io.FileUtil;
1013
import com.intellij.platform.DirectoryProjectGenerator;
1114
import com.intellij.platform.templates.TemplateProjectDirectoryGenerator;
15+
import com.intellij.ui.components.ActionLink;
1216
import com.intellij.util.ui.JBDimension;
17+
import com.intellij.util.ui.JBUI;
1318
import com.intellij.util.ui.UIUtil;
14-
import com.jetbrains.php.actions.PhpStormProjectSpecificSettingsStep;
1519
import org.jetbrains.annotations.NotNull;
1620

1721
import javax.swing.*;
@@ -21,12 +25,28 @@
2125
import java.util.ArrayList;
2226
import java.util.List;
2327

24-
public class ProjectSpecificSettingsStep extends PhpStormProjectSpecificSettingsStep {
28+
public class ProjectSpecificSettingsStep extends ProjectSettingsStepBase {
2529

2630
public ProjectSpecificSettingsStep(DirectoryProjectGenerator projectGenerator, AbstractNewProjectStep.AbstractCallback callback) {
2731
super(projectGenerator, callback);
2832
}
2933

34+
public JPanel createPanel() {
35+
JPanel var1 = super.createPanel();
36+
JPanel var2 = new JPanel(new BorderLayout());
37+
JLabel var3 = new JLabel(IdeCoreBundle.message("title.new.project", new Object[0]));
38+
var3.setFont(var3.getFont().deriveFont(1));
39+
var2.add(var3, "West");
40+
if (this.myProjectGenerator instanceof AbstractGithubTagDownloadedProjectGenerator) {
41+
ActionLink var4 = ((AbstractGithubTagDownloadedProjectGenerator)this.myProjectGenerator).createGitHubLink();
42+
var2.add(var4, "East");
43+
}
44+
45+
var2.setBorder(JBUI.Borders.emptyBottom(10));
46+
var1.add(var2, "North");
47+
return var1;
48+
}
49+
3050
@Override
3151
protected JPanel createAndFillContentPanel() {
3252
WebProjectSettingsStepWrapper settingsStep = new WebProjectSettingsStepWrapper(this);

src/main/kotlin/io/maliboot/devkit/idea/lombok/index/CustomMemberPsiGist.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package io.maliboot.devkit.idea.lombok.index
33
import com.intellij.lang.LighterAST
44
import com.intellij.lang.LighterASTNode
55
import com.intellij.openapi.diagnostic.Logger
6-
import com.intellij.openapi.project.Project
7-
import com.intellij.openapi.vfs.VirtualFile
86
import com.intellij.psi.PsiFile
97
import com.intellij.psi.impl.source.tree.LightTreeUtil
108
import com.intellij.psi.tree.IElementType
@@ -198,7 +196,7 @@ class CustomMemberPsiGist {
198196
if (myFieldName == null || myFieldTypeList.isEmpty()) {
199197
return null
200198
}
201-
return PhpFieldNode(myFieldName!!, myFieldTypeList.joinToString("|"), myFieldDefault, myFieldAttrs)
199+
return PhpFieldNode(myFieldName, myFieldTypeList.joinToString("|"), myFieldDefault, myFieldAttrs)
202200
}
203201

204202
private fun filterClassType(type: String, uses: Map<String, String>): String {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<idea-plugin>
1+
<idea-plugin require-restart="true">
22
<id>io.maliboot.www.hyperf</id>
33
<name>Hyperf Booster</name>
44
<vendor email="shilei_zhang@163.com" url="https://github.com/maliboot/maliboot">stone</vendor>

0 commit comments

Comments
 (0)