M3.1: PHP detection and pinned Phpactor download

- crates/lsp toolchain: PHP from php.executable or PATH, `php -v` with a
  5 s timeout and capped output, version parsing (proptest), PHP >= 8.2.
- Pinned Phpactor 2026.06.25.0 (SHA-256 832510fe...59e9); newer releases
  need ext-posix and do not start on Windows.
- Download with ureq + rustls (ring, OS roots via rustls-native-certs):
  HTTPS only, 32 MiB cap, SHA-256 verified before an atomic write, retry
  with backoff. Tests use a local HTTP server only.
- Engine: settings php.executable, phpactor.path, phpactor.autoDownload
  (bool and string setting kinds), toolchain.status,
  toolchain.downloadPhpactor, toolchainChanged, notifications; worker
  thread off the engine lock, results via the pump. Downloads only after
  the host calls Engine::allow_downloads (the desktop does).
- Docs: architecture Toolchain section (network access, D15), G6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-18 11:25:20 +02:00
parent 78709dd76b
commit 50f36cce8b
23 changed files with 2577 additions and 10 deletions

View file

@ -11,6 +11,7 @@ pub mod search;
mod settings;
pub mod syntax;
pub mod theme;
pub mod toolchain;
pub mod ui;
use crate::{EngineError, Registry};
@ -49,5 +50,7 @@ pub fn register_builtins(registry: &mut Registry) -> Result<(), EngineError> {
registry.register(Box::new(goto::Class))?;
registry.register(Box::new(goto::Symbol))?;
registry.register(Box::new(syntax::OutlineCommand))?;
registry.register(Box::new(toolchain::Status))?;
registry.register(Box::new(toolchain::DownloadPhpactor))?;
Ok(())
}