Skip to content

Add PHP support via Intelephense#140

Merged
LakshyAAAgrawal merged 9 commits intomicrosoft:mainfrom
LakshyAAAgrawal:feat/php-support
Apr 10, 2026
Merged

Add PHP support via Intelephense#140
LakshyAAAgrawal merged 9 commits intomicrosoft:mainfrom
LakshyAAAgrawal:feat/php-support

Conversation

@LakshyAAAgrawal
Copy link
Copy Markdown
Collaborator

Summary

Adds PHP language support to multilspy using Intelephense, an npm-based PHP language server.

Based on #107 by @v4rgas — all original commits preserved. This PR builds on top with fixes for integration issues.

What works

  • Go-to-definition
  • Document symbols
  • Completions
  • References (single-file; cross-file is a known Intelephense limitation — see test comment)

Original work by @v4rgas (6 commits)

  • PHP language enum, factory method, README entry
  • Intelephense server class with npm-based setup
  • Tests against phpactor and myclabs/DeepCopy repos

Fixes applied on top

  • .gitignore: static/ was too broad, now scoped to src/multilspy/language_servers/intelephense/static/
  • initialize_params.json: description said "Dart Language Server" (copy-paste error)
  • runtime_dependencies.json: description said "Phpactor" (wrong server name)
  • intelephense.py: use MultilspySettings install dir instead of package static/, add server_binary/server_install_dir support, Windows compatibility (conditional pwd import), check executable not directory, try/finally for cleanup, set completions_available event

Closes #107

v4rgas and others added 7 commits April 10, 2026 02:43
- Fix .gitignore: use specific path instead of overly broad "static/"
- Fix initialize_params.json description: was "Dart", now "Intelephense PHP"
- Fix runtime_dependencies.json description: was "Phpactor", now "Intelephense"
- Fix intelephense.py: use MultilspySettings install dir instead of
  package static/, add server_binary support, handle Windows (no pwd
  module), check executable not directory, add try/finally for cleanup,
  set completions_available event
@LakshyAAAgrawal LakshyAAAgrawal mentioned this pull request Apr 10, 2026
@v4rgas
Copy link
Copy Markdown
Contributor

v4rgas commented Apr 10, 2026

I thought this project was abandoned! So nice to see that my pr was useful

Thanks for merging

@LakshyAAAgrawal
Copy link
Copy Markdown
Collaborator Author

Thanks a lot for your contributions @v4rgas! Not at all. I am sorry for being inactive lately, but the project is not at all abandoned. Would love to continue receiving your feedback and PRs!

request_references() takes positional args (relative_file_path, line,
column), not keyword arg file_path=.
Intelephense free tier has limited cross-file reference support,
returning 0 results. Mark as xfail(strict=False) so it doesn't
block CI but will report if it starts passing.
@LakshyAAAgrawal LakshyAAAgrawal merged commit 3b9469a into microsoft:main Apr 10, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants