Skip to content

Commit 67d9a89

Browse files
committed
Bump version to 0.5.0
1 parent ee51b33 commit 67d9a89

8 files changed

Lines changed: 159 additions & 203 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "phpantom_lsp"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
edition = "2024"
55
license = "MIT"
66

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ PHPantom focuses on deep type intelligence. Here's how it compares:
5151
- **Smart PHPDoc completion.** `@throws` detects uncaught exceptions in the method body, `@param` pre-fills from the signature, and tags are filtered to context and never suggested twice.
5252
- **Array shape inference.** Literal arrays offer key completion with no annotation. Nested shapes, spreads, and array functions like `array_map` preserve element types.
5353
- **Closure parameter inference.** `$users->map(fn($u) => $u->name)` infers `$u` as `User` from the collection's generic context.
54-
- **Generator body types.** `yield` and `$x = yield` resolve to the correct `TValue` and `TSend` from the generator's return annotation.
5554
- **Conditional return types.** PHPStan-style conditional `@return` types resolve to the concrete branch at each call site.
5655
- **Type aliases and shapes.** `@phpstan-type`, `@phpstan-import-type`, and `object{...}` shapes all resolve through to completions.
5756
- **Laravel Eloquent.** Relationships, scopes, accessors, casts, and Builder chains resolve end-to-end. No Larastan, no ide-helper, no database access required.

docs/CHANGELOG.md

Lines changed: 139 additions & 150 deletions
Large diffs are not rendered by default.

docs/todo.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@ feature surface grows.
5151
| 20 | Workspace Symbols (`workspace/symbol`) | Low-Medium | LSP Features | [lsp-features.md §5](todo/lsp-features.md#5-workspace-symbols-workspacesymbol) |
5252
| 21 | Folding Ranges (`textDocument/foldingRange`) | Low | LSP Features | [lsp-features.md §12](todo/lsp-features.md#12-folding-ranges-textdocumentfoldingrange) |
5353
| 22 | Selection Ranges (`textDocument/selectionRange`) | Low | LSP Features | [lsp-features.md §13](todo/lsp-features.md#13-selection-ranges-textdocumentselectionrange) |
54+
| 100 | Formatting proxy (`textDocument/formatting`) | Medium | LSP Features | [lsp-features.md §19](todo/lsp-features.md#19-formatting-proxy-textdocumentformatting-textdocumentrangeformatting) |
5455
| 81 | Work-done progress for GTI and Find References | Low | LSP Features | [lsp-features.md §18](todo/lsp-features.md#18-work-done-progress-for-gti-and-find-references) |
5556
| 101 | Argument count diagnostic | Low | Diagnostics | [diagnostics.md §7](todo/diagnostics.md#7-argument-count-diagnostic) |
5657
| 88 | Early-exit and `Cow` return in `apply_substitution` | Low | Performance | [performance.md §7](todo/performance.md#7-recursive-string-substitution-in-apply_substitution) |
5758
| 87 | Reference-counted `ClassInfo` (`Arc<ClassInfo>`) | Medium | Performance | [performance.md §2](todo/performance.md#2-reference-counted-classinfo-arcclassinfo) |
5859

5960
**After Sprint 3:** PHPantom feels like a complete LSP to everyday
60-
users. Outline, breadcrumbs, workspace search, folding, and smart
61-
select all work. Argument count errors catch real bugs and serve as
62-
a canary for type engine correctness. No one says "it's missing X"
63-
for basic editing workflows.
61+
users. Outline, breadcrumbs, workspace search, folding, formatting,
62+
and smart select all work. Argument count errors catch real bugs and
63+
serve as a canary for type engine correctness. No one says "it's
64+
missing X" for basic editing workflows.
6465

6566
---
6667

@@ -95,26 +96,25 @@ actions.
9596
## Sprint 5 — Polish for office adoption
9697

9798
These items close the gaps that PHPStorm and VS Code + Intelephense
98-
users at the office would notice. PHPDoc generation and formatting
99-
are the most common "where did that go?" moments. Inlay hints are
100-
high-visibility in VS Code. The implementation error diagnostic
101-
reuses existing code action logic and pairs with the quick-fix.
102-
File rename on class rename removes a friction point that
103-
Intelephense premium users expect.
99+
users at the office would notice. PHPDoc generation is the most
100+
common "where did that go?" moment. Inlay hints are high-visibility
101+
in VS Code. The implementation error diagnostic reuses existing code
102+
action logic and pairs with the quick-fix. File rename on class
103+
rename removes a friction point that Intelephense premium users
104+
expect.
104105

105106
| # | Item | Effort | Domain | Doc Link |
106107
|---|---|---|---|---|
107108
| 24 | PHPDoc block generation on `/**` | Medium | LSP Features | [lsp-features.md §3](todo/lsp-features.md#3-phpdoc-block-generation-on-) |
108-
| 100 | Formatting proxy (php-cs-fixer / phpcbf) | Medium | LSP Features | [lsp-features.md §19](todo/lsp-features.md#19-formatting-proxy-textdocumentformatting-textdocumentrangeformatting) |
109109
| 40 | Inlay hints (`textDocument/inlayHint`) | Medium | LSP Features | [lsp-features.md §9](todo/lsp-features.md#9-inlay-hints-textdocumentinlayhint) |
110110
| 102 | Implementation error diagnostic | Medium | Diagnostics | [diagnostics.md §9](todo/diagnostics.md#9-implementation-error-diagnostic) |
111111
| 99 | File rename on class rename | Medium | LSP Features | [lsp-features.md §20](todo/lsp-features.md#20-file-rename-on-class-rename) |
112112
| 103 | Stub extension selection (`[stubs] extensions`) | Low | Configuration | [config.md §stubs](todo/config.md#extension-stub-selection) |
113113

114114
**After Sprint 5:** PHPantom is ready for office colleagues. They
115-
get formatting, PHPDoc generation, inlay hints, and the diagnostics
116-
they're used to. Nobody switching from Intelephense (free or
117-
premium) feels like they lost more than they gained.
115+
get PHPDoc generation, inlay hints, and the diagnostics they're used
116+
to. Nobody switching from Intelephense (free or premium) feels like
117+
they lost more than they gained.
118118

119119
---
120120

docs/todo/actions.md

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,14 @@ within the same impact tier.
88
| **Impact** | **Critical**, **High**, **Medium-High**, **Medium**, **Low-Medium**, **Low** |
99
| **Effort** | **Low** (≤ 1 day), **Medium** (2-5 days), **Medium-High** (1-2 weeks), **High** (2-4 weeks), **Very High** (> 1 month) |
1010

11-
No quick fixes or refactoring suggestions exist today. No `codeActionProvider` in
12-
`ServerCapabilities`, no `textDocument/codeAction` handler, and no
13-
`WorkspaceEdit` generation infrastructure beyond trivial `TextEdit`s for
14-
use-statement insertion.
15-
1611
**Refactoring code actions overview:** §3 (Extract Function), §7 (Inline
1712
Variable), §8 (Extract Variable), and §9 (Inline Function/Method) form
1813
the core refactoring toolkit. They share infrastructure for scope
1914
analysis, variable usage tracking, and `WorkspaceEdit` generation.
2015

21-
---
22-
2316
## 1. Implement missing abstract/interface methods
24-
**Impact: Medium · Effort: Medium**
25-
26-
When a non-abstract class extends an abstract class or implements an
27-
interface but is missing required method implementations, offer a code
28-
action to generate stubs for all missing methods.
29-
30-
### Behaviour
3117

32-
- Detect the gap: resolve the full class hierarchy (already done by
33-
`resolve_class_with_inheritance`), collect all abstract methods from
34-
parent classes and all methods from implemented interfaces, subtract
35-
the methods the class already defines.
36-
- Offer a code action: `Implement missing methods` (or list them
37-
individually: `Implement Foo::bar`, `Implement Baz::qux`).
38-
- Generate method stubs at the end of the class body with:
39-
- Correct visibility and static modifiers matching the interface/abstract declaration.
40-
- Parameter names, type hints, and default values from the parent.
41-
- Return type from the parent.
42-
- PHPDoc block inherited from the parent (or `{@inheritDoc}`).
43-
- Body: `throw new \RuntimeException('Not implemented');` or
44-
`// TODO: Implement` — pick one convention.
45-
46-
**Why this is a good first code action:** It exercises the full
47-
`codeActionProvider``WorkspaceEdit``TextEdit` pipeline without
48-
needing scope analysis or cross-file edits. The class hierarchy data
49-
is already fully resolved. This builds the infrastructure that Extract
50-
Function and other code actions depend on.
18+
No outstanding items. Shipped in the current release cycle.
5119

5220
---
5321

@@ -157,7 +125,7 @@ variable X in this scope" as a natural byproduct.
157125
| Hover | "Resolve type at arbitrary position" — needed to type params |
158126
| Document Symbols (see `todo-lsp-features.md`) | AST range → symbol mapping — needed to find enclosing function and valid insertion points |
159127
| Find References (see `todo-lsp-features.md`) | Variable usage tracking across a scope — the same "which variables are used where" analysis |
160-
| Implement missing methods (§1) | Builds the code action + `WorkspaceEdit` plumbing |
128+
| Implement missing methods (§1, shipped) | Builds the code action + `WorkspaceEdit` plumbing |
161129

162130
---
163131

zed-extension/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "phpantom-zed"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
edition = "2021"
55
publish = false
66
license = "MIT"

zed-extension/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id = "phpantom"
22
name = "PHPantom"
33
description = "PHP language support powered by PHPantom LSP, a fast and lightweight PHP language server."
4-
version = "0.4.0"
4+
version = "0.5.0"
55
schema_version = 1
66
authors = ["Anders Jenbo <anders@jenbo.dk>"]
77
repository = "https://github.com/AJenbo/phpantom_lsp"

0 commit comments

Comments
 (0)