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
-[Composer](https://getcomposer.org/) (for PHP standard library stubs)
14
12
15
13
## Build
16
14
17
-
The PHP stubs are managed as a Composer dependency in `stubs/`. The `build.rs` script embeds the [JetBrains phpstorm-stubs](https://github.com/JetBrains/phpstorm-stubs) directly into the binary, giving the LSP full knowledge of built-in PHP classes, functions, and constants with no runtime dependencies.
15
+
The `build.rs` script automatically fetches the latest [JetBrains phpstorm-stubs](https://github.com/JetBrains/phpstorm-stubs)from GitHub and embeds them directly into the binary. This gives the LSP full knowledge of built-in PHP classes, functions, and constants with no runtime dependencies.
18
16
19
-
> [!NOTE]
20
-
> The build will succeed without `composer install`, but the resulting binary won't know about built-in PHP symbols like `Iterator`, `Countable`, `UnitEnum`, etc. Always run `composer install` first for a fully functional build.
21
-
22
-
After updating stubs (`composer update`), just rebuild. `build.rs` watches `composer.lock` and re-embeds everything automatically.
17
+
The stubs are downloaded on first build and cached in `stubs/`. To update to the latest stubs, delete the `stubs/` directory and rebuild.
23
18
24
19
For details on how symbol resolution and stub loading work, see [ARCHITECTURE.md](ARCHITECTURE.md).
25
20
@@ -65,4 +60,4 @@ RUST_LOG=debug cargo run 2>phpantom.log
65
60
66
61
Logs are written to stderr, so redirect as needed.
67
62
68
-
For editor setup instructions, see [SETUP.md](SETUP.md).
63
+
For editor setup instructions, see [SETUP.md](SETUP.md).
0 commit comments