Files
nexus/wiki/entities/Intelephense.md

40 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Intelephense"
type: entity
tags: [language-server, php]
sources: [lsp-index-engineer]
last_updated: 2026-04-25
---
## Definition
Intelephense 是 PHP 语言的主流 Language Server Protocol 实现,提供高性能的 PHP 代码智能功能,包括跳转到定义、查找引用、悬停文档、符号导航等。
## Usage in LSP/Index Engineer
LSP/Index Engineer 的 graphd 系统通过以下方式使用 Intelephense
```typescript
const phpClient = new LanguageClient('php', {
command: 'intelephense',
args: ['--stdio'],
rootPath: projectRoot
});
```
## Known Limitations
Intelephense 与 TypeScript Language Server 相比:
- 不支持层级符号Hierarchical Symbols
- PHP 的命名空间和类结构解析有差异
- LSP/Index Engineer 在 graphd 中需要针对这些差异进行适配处理
## Note
TypeScript 和 PHP 支持是 LSP/Index Engineer 的**默认要求**必须首先达到生产就绪状态。PHP 优先使用 Intelephense也可选择 phpactor 作为替代。
## Aliases
- intelephense
- PHP Language Server
- PHP LSP