You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
A fast, lightweight PHP language server written in Rust. Uses only a few MB of RAM regardless of project size and is fully responsive in milliseconds. No indexing phase, no background workers, no waiting.
4
4
5
5
> [!NOTE]
6
-
> PHPantom is in active development. Completion and go-to-definitionare solid and used daily. More LSP features (hover, signature help, find references) are on the roadmap.
6
+
> PHPantom is in active development. Completion, go-to-definition, and signature help are solid and used daily. More LSP features (hover, find references) are on the roadmap.
7
7
8
8
## Features
9
9
@@ -22,8 +22,8 @@ PHPantom focuses on completion and go-to-definition and aims to do them really w
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Added
11
11
12
+
-**Signature help.** Parameter hints now appear automatically when typing inside function and method call parentheses. The active parameter is highlighted and updates as you type commas. Supported call forms: standalone functions, instance methods (`$var->method(`), static methods (`Class::method(`), constructors (`new Class(`), `self::`, `static::`, and `parent::` calls. Works with inherited methods, trait methods, built-in (stub) functions, and cross-file PSR-4 resolution. Variadic parameters stay highlighted for extra arguments. Incomplete code is handled via automatic content patching (same strategy as named-argument completion).
12
13
-**Hover.** Hovering over any symbol now shows its type, signature, and docblock description in a Markdown popup. Supported symbols include variables (with inferred types), methods (with full parameter list and return type), properties, class constants, class/interface/trait/enum references (with FQN, parent, interfaces, and docblock summary), function calls, and `$this`/`self`/`static`/`parent` keywords. Works across files via the same resolution pipeline that powers completion and go-to-definition. Deprecated members are marked with `@deprecated`.
13
14
-**Closure parameter inference.** When a closure or arrow function is passed to a method or function whose parameter is typed as `callable(T): R` or `Closure(T): R`, untyped closure parameters are now inferred from the callable signature. For example, `$users->map(fn($u) => $u->name)` infers `$u` as `User` when `map` declares `@param callable(TValue): TMapValue` and generic substitution has resolved `TValue` to `User`. Works with instance methods, static methods, null-safe calls, standalone functions, `$this->method()` receivers, and closures at any argument position. Explicit type hints on closure parameters always take precedence. Template parameters inside callable signatures (e.g. `callable(TValue): void`) are substituted during generic resolution so the inferred types are concrete.
14
15
-**Factory support.**`User::factory()->create()` and `->make()` now resolve to the model class. When a model uses the `HasFactory` trait with an explicit `@use HasFactory<UserFactory>` annotation, the generics system handles resolution. When the annotation is absent, the naming convention is used as a fallback: `App\Models\User` maps to `Database\Factories\UserFactory`, and subdirectories are preserved (`App\Models\Admin\SuperUser` maps to `Database\Factories\Admin\SuperUserFactory`). Factory chain methods that return `static` (e.g. `count()`, `state()`) continue the chain on the factory, while `create()` and `make()` return the model. The convention also works in reverse: a factory class extending `Factory` without `@extends Factory<Model>` resolves `TModel` from its own class name. Both directions are implemented as fallbacks that defer to explicit generics when present.
0 commit comments