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
+19-37Lines changed: 19 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# PHPantomLSP
2
2
3
-
A fast, lightweight PHP language server that stays out of your way. Using only a few MB of RAM regardless of project size, fully usable in milliseconds, without requiring high-end hardware.
3
+
A fast, lightweight PHP language server that stays out of your way. Using only a few MB of RAM regardless of project size and fully usable in milliseconds without requiring high-end hardware.
4
4
5
5
> **Note:** This project is in active development.
6
6
@@ -10,20 +10,22 @@ A fast, lightweight PHP language server that stays out of your way. Using only a
10
10
11
11
- Full text document sync (open, change, close)
12
12
13
-
### Type Resolution
13
+
### PHP Analysis & Type Resolution
14
14
15
-
Both completion and go-to-definition draw from a shared type resolution engine:
15
+
PHPantom uses a shared analysis engine built on [Mago](https://github.com/carthage-software/mago)'s PHP parser for parsing and type resolution, powering both completion and go-to-definition.
16
16
17
-
-`$this`, `self`, `static`, and `parent` keyword resolution
18
-
- Variable type inference from assignments (`$var = new Foo()`) and parameter type hints
19
-
- Property chain and method call chaining (e.g. `$this->getService()->doSomething()`)
20
-
- Function and static method call return type resolution (e.g. `app()->`, `Class::make()->`)
21
-
- Inheritance-aware: walks the class hierarchy including traits
22
-
- Enum case resolution
23
-
- Union types: `A|B` in return types, property types, and parameter hints are split into individual candidates
24
-
- Ambiguous variables: when a variable is assigned different types in conditional branches, all possible types are tried
- PHPStan conditional return types: annotations like `@return ($abstract is class-string<TClass> ? TClass : mixed)` are resolved based on call-site arguments
17
+
- Extracts classes, interfaces, traits, enums, and standalone functions
18
+
- Parses methods, properties, constants, and constructor-promoted properties with visibility, static modifiers, and type hints
19
+
- Parses `use` statements and namespace declarations
0 commit comments