Skip to content

Commit 339cd56

Browse files
committed
Add official publisher, update branding, and improve docs
1 parent bcd7570 commit 339cd56

9 files changed

Lines changed: 194 additions & 95 deletions

File tree

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
20+
- run: npm ci
21+
22+
- run: npm run check
23+
24+
- run: npx vsce package --no-dependencies
25+
26+
- name: Upload VSIX to GitHub Release
27+
uses: softprops/action-gh-release@v2
28+
with:
29+
files: "*.vsix"

.vscode/launch.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
9+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
10+
"preLaunchTask": "npm: compile"
11+
}
12+
]
13+
}

.vscode/tasks.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "compile",
7+
"group": "build",
8+
"problemMatcher": []
9+
},
10+
{
11+
"type": "npm",
12+
"script": "watch",
13+
"isBackground": true,
14+
"group": "build",
15+
"problemMatcher": []
16+
}
17+
]
18+
}

CHANGELOG.md

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,57 @@
11
# Changelog
22

3-
## 0.3.1 - 2026-05-15
3+
All notable changes to the PHPantom VS Code extension will be documented in this file.
44

5-
- Added PHP outline augmentation so named functions and methods can appear in Sticky Scroll.
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7-
## 0.3.0
7+
## [Unreleased]
88

9-
- Added a PHPantom status bar item for server state and output-channel access.
10-
- Added `PHPantom: Show Server Version`.
11-
- Renamed the manual server update command to `PHPantom: Check for Server Update`.
12-
- Added a startup summary to the PHPantom output channel.
9+
### Changed
10+
11+
- Extension is now published under the official PHPantom publisher.
12+
- Repository links point to the PHPantom-dev GitHub organization.
13+
- README rewritten for marketplace presentation.
14+
15+
## [0.3.1] - 2026-05-15
16+
17+
### Added
18+
19+
- PHP outline augmentation so named functions and methods can appear in Sticky Scroll.
20+
21+
## [0.3.0]
22+
23+
### Added
24+
25+
- PHPantom status bar item for server state and output-channel access.
26+
- `PHPantom: Show Server Version` command.
27+
- Startup summary in the PHPantom output channel.
1328
- Prompt before restarting after a downloaded server update.
14-
- Show an information message when binary resolution settings restart the language server.
29+
- Information message when binary resolution settings restart the language server.
30+
31+
### Changed
32+
33+
- Renamed the manual server update command to `PHPantom: Check for Server Update`.
1534

16-
## 0.2.1
35+
## [0.2.1]
36+
37+
### Fixed
1738

1839
- Serialized language server lifecycle operations to prevent duplicate `phpantom_lsp` processes during overlapping startup, restart, and update checks.
1940
- Added a restart fallback that terminates `phpantom_lsp` if it does not exit after a graceful stop timeout.
2041
- Restart the server automatically when binary resolution settings such as `phpantom.serverPath` change.
2142

22-
## 0.2.0
43+
## [0.2.0]
44+
45+
### Added
46+
47+
- Background checks for newer PHPantom language server releases when using `phpantom.releaseTag = "latest"`.
48+
- Automatic restart after a newer downloaded server is cached.
49+
- `phpantom.autoUpdate` and `phpantom.updateCheckIntervalHours` settings.
2350

24-
- Added background checks for newer PHPantom language server releases when using `phpantom.releaseTag = "latest"`.
25-
- Added automatic restart after a newer downloaded server is cached.
26-
- Added `phpantom.autoUpdate` and `phpantom.updateCheckIntervalHours` settings.
51+
## [0.1.0]
2752

28-
## 0.1.0
53+
### Added
2954

30-
- Added a dedicated VS Code/Cursor extension for PHPantom.
31-
- Added automatic `phpantom_lsp` discovery via `phpantom.serverPath`, PATH, local cache, and GitHub Releases download.
32-
- Added commands for restart, output, forced download, and clearing cached binaries.
55+
- Dedicated VS Code/Cursor extension for PHPantom.
56+
- Automatic `phpantom_lsp` discovery via `phpantom.serverPath`, PATH, local cache, and GitHub Releases download.
57+
- Commands for restart, output, forced download, and clearing cached binaries.

README.md

Lines changed: 62 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,76 @@
1-
# PHPantom for VS Code and Cursor
1+
# PHPantom
2+
3+
PHP language support for Visual Studio Code powered by [PHPantom](https://github.com/PHPantom-dev/phpantom_lsp), a fast language server with deep type intelligence, generics, and framework-awarness.
4+
5+
## Features
6+
7+
![PHPantom showing hover and completion on a Laravel query](https://raw.githubusercontent.com/PHPantom-dev/vscode-phpantom/main/assets/hover-compleation.png)
8+
9+
- **Code completion.** Type-aware suggestions for symbols, keywords, and members with automatic use declaration insertion.
10+
- **Signature help.** Parameter hints for constructors, methods, and functions.
11+
- **Navigation.** Go to definition, type definition, implementation, find all references, and rename.
12+
- **Diagnostics.** Undefined symbols, type errors, argument count mismatches, deprecated usage, unused imports, and implementation errors.
13+
- **Hover.** Type information and PHPDoc documentation.
14+
- **Code actions.** Extract variable/method/constant, inline variable, generate constructor/getters/setters, implement interface methods, auto-import, and PHPDoc generation.
15+
- **Call hierarchy and type hierarchy.**
16+
- **Semantic tokens, inlay hints, and code lens.**
17+
- **Document highlight and workspace symbol search.**
18+
- **Formatting.** PSR-12 compatible, with optional Laravel Pint integration.
19+
- **Code folding and smart selection.**
20+
- **Document links** for include/require paths.
21+
- **Deep type intelligence.** Generics (`@template`), PHPStan/Psalm annotations, and framework-aware analysis including Laravel Eloquent.
22+
23+
## Quick Start
24+
25+
1. Disable the built-in VS Code PHP Language Features.
26+
- Go to `Extensions`.
27+
- Search for `@builtin php`.
28+
- Disable `PHP Language Features`. Leave `PHP Language Basics` enabled for syntax highlighting.
29+
2. Disable other PHP language servers (Intelephense, Phpactor, PHP Tools) to avoid duplicate content.
30+
3. Open a PHP project. PHPantom downloads and starts the language server automatically.
31+
32+
To use a custom binary, set `phpantom.serverPath` to the path of your `phpantom_lsp` binary. You can build from source with `cargo install phpantom_lsp` or download a release from [GitHub](https://github.com/PHPantom-dev/phpantom_lsp/releases).
33+
34+
## Settings
35+
36+
| Setting | Default | Description |
37+
| --- | --- | --- |
38+
| `phpantom.serverPath` | `""` | Path to a custom `phpantom_lsp` binary. |
39+
| `phpantom.releaseTag` | `"latest"` | GitHub release tag to download. |
40+
| `phpantom.autoDownload` | `true` | Automatically download the server if not found. |
41+
| `phpantom.autoUpdate` | `true` | Check for newer releases periodically. |
42+
| `phpantom.updateCheckIntervalHours` | `24` | How often to check for updates (1-168 hours). |
43+
| `phpantom.trace.server` | `"off"` | Trace communication with the language server. |
244

3-
[PHPantom](https://github.com/AJenbo/phpantom_lsp) is a fast PHP language server written in Rust. This extension starts `phpantom_lsp` automatically for PHP files in VS Code-compatible editors, including Cursor.
4-
5-
On first activation, the extension looks for a server binary in this order:
6-
7-
1. `phpantom.serverPath`
8-
2. `phpantom_lsp` on `PATH` (`phpantom_lsp.exe` on Windows)
9-
3. A cached binary in the extension global storage
10-
4. A GitHub Releases download from `AJenbo/phpantom_lsp`, when `phpantom.autoDownload` is enabled
11-
12-
When `phpantom.releaseTag` is `latest`, the extension also checks for newer PHPantom releases in the background on startup and periodically while active. If a newer downloaded binary becomes available, PHPantom asks whether to restart the language server now or use the update later. Background updates are skipped when `phpantom.serverPath` is set, `phpantom.autoDownload` is disabled, `phpantom.autoUpdate` is disabled, or a `phpantom_lsp` binary on `PATH` has priority.
13-
14-
The language server communicates over stdio and attaches to files with language ID `php`. A PHPantom status bar item shows whether the server is starting, ready, checking for updates, waiting for restart, stopped, or failed. Click it to open the PHPantom output channel.
15-
16-
On startup, the PHPantom output channel logs the extension version, workspace path, active server source, server path, and auto-update state.
17-
18-
## Cursor
19-
20-
Once published, install PHPantom from Open VSX in Cursor's Extensions view.
21-
22-
For a local package:
23-
24-
1. Run `npm install` in this directory.
25-
2. Run `npm run package`.
26-
3. In Cursor, run `Extensions: Install from VSIX...`.
27-
4. Select the generated `.vsix` file.
28-
29-
## VS Code
30-
31-
Install the generated `.vsix` with `Extensions: Install from VSIX...`, or install from the marketplace if PHPantom is published there in the future.
32-
33-
## Configuration
34-
35-
`phpantom.serverPath`
36-
37-
Absolute path to a custom `phpantom_lsp` binary. When set, this overrides PATH lookup and downloads. Changing this setting restarts the PHPantom language server.
38-
39-
`phpantom.releaseTag`
40-
41-
GitHub release tag to download. The default is `latest`, which uses the latest stable GitHub release. Changing this setting restarts the PHPantom language server.
42-
43-
`phpantom.autoDownload`
44-
45-
Automatically download `phpantom_lsp` when no configured or PATH binary is available. Enabled by default.
46-
47-
`phpantom.autoUpdate`
48-
49-
Automatically check for newer downloaded `phpantom_lsp` releases when `phpantom.releaseTag` is `latest`. Enabled by default. Ignored when `phpantom.serverPath` is set.
50-
51-
`phpantom.updateCheckIntervalHours`
45+
## Commands
5246

53-
How often to check for newer PHPantom language server releases while the extension is active. The extension also checks once on startup without blocking activation. Defaults to `24`.
47+
- **PHPantom: Restart Language Server.** Restart the language server.
48+
- **PHPantom: Show Output.** Open the PHPantom output channel.
49+
- **PHPantom: Show Server Version.** Display the running server version.
50+
- **PHPantom: Check for Server Update.** Check for a newer server binary.
51+
- **PHPantom: Clear Downloaded Language Server.** Remove cached server binaries.
5452

55-
`phpantom.trace.server`
53+
## How It Works
5654

57-
Controls Language Server Protocol tracing. Values are `off`, `messages`, and `verbose`.
55+
On activation the extension locates a server binary in this order:
5856

59-
## Commands
57+
1. `phpantom.serverPath` setting
58+
2. `phpantom_lsp` on `PATH`
59+
3. A previously cached binary
60+
4. Download from GitHub Releases (when `phpantom.autoDownload` is enabled)
6061

61-
- `PHPantom: Restart Language Server`
62-
- `PHPantom: Show Output`
63-
- `PHPantom: Show Server Version`
64-
- `PHPantom: Check for Server Update`
65-
- `PHPantom: Clear Downloaded Language Server`
62+
When `phpantom.releaseTag` is `"latest"`, the extension checks for updates on startup and periodically while active. A status bar item shows the server state.
6663

6764
## Troubleshooting
6865

69-
If the binary download fails, open the `PHPantom` output channel. The error lists the release tag, platform, expected asset names, and available assets when GitHub returns a release. You can also download a binary from the PHPantom GitHub Releases page and set `phpantom.serverPath`.
66+
If the download fails, open the PHPantom output channel for details. You can always download a binary manually and set `phpantom.serverPath`.
7067

71-
If your platform is unsupported, build `phpantom_lsp` from source and point `phpantom.serverPath` at the local binary.
68+
If your platform is unsupported, build from source and point `phpantom.serverPath` at the result.
7269

73-
If diagnostics appear twice, another PHP language server such as Intelephense, Phpactor, or PHP Tools may also be active. Disable the duplicate PHP LSP extension for the workspace.
70+
## License
7471

75-
To use a local binary, build PHPantom from source or download a release manually, then set `phpantom.serverPath` to the absolute path of `phpantom_lsp` or `phpantom_lsp.exe`.
72+
[MIT](LICENSE)
7673

77-
## Security
74+
---
7875

79-
Downloaded binaries come from [AJenbo/phpantom_lsp](https://github.com/AJenbo/phpantom_lsp) GitHub Releases. The extension verifies release asset size and verifies GitHub SHA-256 digests when GitHub publishes them. If upstream publishes standalone checksum files in the future, the extension should verify those checksums as well.
76+
See the [PHPantom language server changelog](https://github.com/PHPantom-dev/phpantom_lsp/blob/main/docs/CHANGELOG.md) for improvements to type intelligence, diagnostics, and completions.

assets/hover-compleation.png

108 KB
Loading

package-lock.json

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

package.json

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,54 @@
22
"name": "phpantom",
33
"displayName": "PHPantom",
44
"description": "Fast PHP language server with Laravel and PHPStan-aware type intelligence.",
5-
"version": "0.3.1",
6-
"publisher": "CicerBro",
5+
"version": "0.4.0",
6+
"publisher": "phpantom",
77
"license": "MIT",
88
"icon": "assets/spookaphant.png",
9+
"preview": true,
10+
"galleryBanner": {
11+
"color": "#1a1a2e",
12+
"theme": "dark"
13+
},
914
"repository": {
1015
"type": "git",
11-
"url": "https://github.com/CicerBro/phpantom_vsix.git"
16+
"url": "https://github.com/PHPantom-dev/phpantom_lsp.git",
17+
"directory": "vscode-phpantom"
1218
},
1319
"bugs": {
14-
"url": "https://github.com/CicerBro/phpantom_vsix/issues"
20+
"url": "https://github.com/PHPantom-dev/phpantom_lsp/issues"
1521
},
16-
"homepage": "https://github.com/CicerBro/phpantom_vsix#readme",
22+
"homepage": "https://github.com/PHPantom-dev/phpantom_lsp#readme",
1723
"engines": {
1824
"vscode": "^1.88.0"
1925
},
2026
"categories": [
21-
"Programming Languages"
27+
"Programming Languages",
28+
"Linters",
29+
"Formatters"
2230
],
2331
"keywords": [
2432
"php",
25-
"phpantom",
26-
"lsp",
27-
"language server",
2833
"laravel",
29-
"phpstan"
34+
"drupal",
35+
"lsp",
36+
"phpstan",
37+
"intellisense"
3038
],
3139
"activationEvents": [
3240
"onLanguage:php"
3341
],
3442
"main": "./dist/extension.js",
43+
"extensionKind": [
44+
"workspace"
45+
],
3546
"contributes": {
47+
"languages": [
48+
{
49+
"id": "php",
50+
"aliases": ["PHP"]
51+
}
52+
],
3653
"commands": [
3754
{
3855
"command": "phpantom.restartServer",

src/downloader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as tar from "tar";
1111
import * as vscode from "vscode";
1212
import { getPlatformInfo, PlatformInfo } from "./platform";
1313

14-
const repository = "AJenbo/phpantom_lsp";
14+
const repository = "PHPantom-dev/phpantom_lsp";
1515
const apiBaseUrl = `https://api.github.com/repos/${repository}/releases`;
1616
const userAgent = "phpantom-vscode-extension";
1717
const latestMarkerFile = "latest.json";

0 commit comments

Comments
 (0)