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
Show reference counts for classes, enums, interfaces, traits, methods,
properties, and constants as inlay hints instead of non-actionable code
lenses. Interface and abstract class declarations also show implementation
counts. Code lenses remain reserved for actionable prototype navigation.
The hints omit private members, magic methods, and overridden members to
avoid noisy or misleading counts, while still showing zero-reference hints
so users can distinguish unused symbols from missing data.
Go-to-definition on overridden declarations now follows methods,
properties, and constants to the nearest parent, trait, or interface
prototype where applicable.
Use a single all-targets Clippy invocation in CI and let agent docs prefer
clippy --fix so automated changes apply safe lint suggestions before
formatting.
Closes#140
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
-**`@phpstan-ignore` identifiers are highlighted and completed.** PHPStan ignore comments now highlight the `@phpstan-ignore` tag and each listed error identifier in both docblocks and ordinary `//` comments. Identifier completion works inside the comma-separated ignore list, using PHPStan diagnostic codes already seen in the current file while staying out of per-code parenthesized reasons. Contributed by @calebdw.
13
13
-**Parent member override completion.** Typing a method name after `function` in a class body (for example `protected function get`) now suggests public and protected methods from parent classes and interfaces that can still be overridden or implemented, inserting a full signature snippet. The same flow suggests parent properties after `$` (for example `protected $tit`) and parent constants after `const`. Snippets insert `#[\Override]` above methods on PHP 8.3+, properties on PHP 8.5+, and constants on PHP 8.6+ (from `composer.json` / `config.platform.php`). Private members and ones already defined on the class are omitted. Contributed by @calebdw.
14
+
-**Reference and implementation count inlay hints.** Classes, interfaces, traits, enums, methods, properties, and constants now show reference counts (e.g. "3 references") as inlay hints. Interfaces and abstract classes additionally show implementation counts (e.g. "2 implementations"). Counts are derived from the cross-file reference index and the go-to-implementation reverse inheritance index, so they are fast even on large codebases. Private members, magic methods, and overridden members are omitted to keep the annotations focused. Contributed by @calebdw.
14
15
-**Trait member override completion.** Typing a method or property name after `function` or `$` in a class that uses a trait now suggests the trait's public and protected members as override candidates. Unlike parent/interface overrides, trait method replacements do not insert `#[\Override]` (which would be a compile error for trait-only methods). Classes that only use traits without extending a parent or implementing an interface also receive suggestions. Contributed by @calebdw.
15
16
-**Laravel schema dumps power Eloquent model properties.** PHPantom now scans Laravel database schema dumps from `database/schema` by default, reads `config/database.php` for connection drivers/defaults, and uses the parsed columns to synthesize Eloquent model properties with database types, nullability, and defaults in hover. Schema lookup respects model `$connection`, `$table`, Laravel `Connection`/`Table` attributes, dynamic table/connection overrides, and reloads when schema files or related config change. Contributed by @calebdw.
16
17
-**Laravel migration scanning for Eloquent model properties.** PHPantom now parses Laravel migration files to infer database columns when schema dumps are not available or to overlay changes on top of dumps. Migrations are discovered from any non-vendor `database/migrations` directory (including nested modules like `modules/billing/database/migrations`), applied in global filename order, and support named and anonymous migration classes, `$connection` properties, `Schema::connection()` calls, `Blueprint::after()` nested closures, `virtualAs`/`storedAs` generated columns, and custom Blueprint macros registered via the existing macro scanner. Migration scanning is incremental: editing a single migration re-reads only that file and replays the cached plan over the base schema without re-reading other files. Configure with `[laravel.migrations] enabled` and `paths` in `.phpantom.toml`. Contributed by @calebdw.
@@ -42,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
43
### Fixed
43
44
44
45
-**Go-to-definition on overriding methods jumps to the parent declaration.** When the cursor is on a method definition that overrides a parent or implements an interface method, go-to-definition now navigates to the prototype declaration instead of returning call-site references. Similarly, go-to-definition on a class name jumps to the parent class when one exists. Methods and classes that don't override anything still show usages as before. Contributed by @calebdw.
46
+
-**Go-to-definition on overridden properties and constants jumps to the prototype declaration.** Declaration-site navigation now follows overridden properties and constants to the nearest parent or trait declaration, matching the override behavior for methods. Contributed by @calebdw.
45
47
-**Code lens navigation works on Cursor, VSCodium, Neovim, and other editors.** Clicking a code lens annotation (e.g. "overrides Parent::method") now uses the standard `window/showDocument` LSP request instead of editor-specific commands (`vscode.open`, `editor.action.showReferences`) that only worked on VS Code. Contributed by @calebdw.
46
48
-**Go-to-implementation works when interface and class share the same short name.** An interface and its implementing class in different namespaces but with the same class name (e.g. `App\Contracts\HttpClient` and `App\Foo\HttpClient`) now resolves correctly instead of returning no results. Contributed by @calebdw.
47
49
-**Static method calls resolve return types as accurately as instance calls.**`Foo::bar()` previously missed inference that `$foo->bar()` already had: return types behind a `@phpstan-type` alias, inherited return types substituted through a generic interface or trait, and the `__callStatic()` magic-method fallback. These now resolve the same way for both call styles.
0 commit comments