Symfony Language Tools
Symfony Language Tools makes your editor understand Symfony: route names, service IDs, template names, translation keys, environment variables, bundle configuration and more get completion, hover, navigation, references, rename and diagnostics. It works alongside a general PHP language server.
Use it two ways:
- in your editor, while you write code;
- on the command line, to check a project in CI or before a commit.
See the supported integrations for what it knows about Symfony.
Installation
Visual Studio Code
Install the self-contained extension from the Visual Studio Marketplace or, for VSCodium, the Open VSX Registry:
code --install-extension symfony.language-tools
codium --install-extension symfony.language-toolsAdd --pre-release for prerelease versions. See the
VS Code guide.
Neovim
Install symfony-lsp from a release or with Mason, then enable it:
vim.lsp.enable('symfony_lsp')See the Neovim guide.
Vim
Install symfony-lsp, then register it with the vim-lsp plugin. See the
Vim guide.
Zed
The extension isn't in Zed's registry yet. Install it from source by following the Zed guide. Linux and Apple Silicon macOS only.
OpenCode
Install symfony-lsp, then declare it as a custom language server so the
coding agent gets Symfony diagnostics and navigation. See the
OpenCode guide.
PhpStorm and other JetBrains IDEs
Prefer the native Symfony Plugin. To use this server instead, run it through the LSP4IJ plugin. See the JetBrains guide.
Standalone server
Download the archive for your platform from
GitHub Releases, verify
it against SHA256SUMS and extract the self-contained symfony-lsp
executable:
./symfony-lsp --versionSee the installation guide for supported platforms and building from source.
Continuous Integration
Check saved files without an editor:
symfony-lsp check --format=githubSymfony CLI can manage the executable for you with symfony lsp:check. The
checker reports in human, JSON, GitHub Actions, GitLab Code Quality and SARIF
formats, blocks on the codes you choose and accepts existing findings through
a baseline. It runs your application unless you pass --source-only. See the
command-line guide.
Requirements
An application on a maintained Symfony version, with its Composer dependencies installed and a PHP command compatible with it. That command can run in a container; see Docker support.
Tested with Real Applications
Symfony Language Tools is continuously tested with Kimai, Mautic, Sulu Demo, Sulu Skeleton, Sylius, Shopware, Pimcore Skeleton and Symfony Demo across supported Symfony versions.
Documentation
- Installation
- Using it in your editor
- Checking a project from the command line
- Supported Symfony integrations
- Project configuration
- Docker support
- Changelog
Contributing
This repository uses an issue-first contribution model and does not accept external pull requests. Read the contribution guide before reporting a bug or requesting a feature. If you use an agent, point it to the guide and ask it to help prepare the issue using whatever context is most relevant to your setup, configuration, and use case.
Security
Read the security policy to report a potential vulnerability privately.
License
Symfony Language Tools is available under the MIT License. Distributions also include the applicable third-party notices and license texts.