Skip to content

Repository files navigation

Symfony Language Tools

Symfony Language Tools adds Symfony-aware completion, hover, navigation, references, diagnostics, code actions, rename support and code lenses to your editor. It works alongside a general PHP language server.

Features cover routing, dependency injection, Twig, translations, environment variables, bundle configuration, Messenger, events, Security, forms, validation, serializer metadata, AssetMapper, Stimulus, Live Components and Doctrine. See the supported integrations for details.

Symfony Language Tools is continuously tested with real applications including Kimai, Mautic, Sulu Demo, Sylius, Shopware and Symfony Demo across supported Symfony versions.

Installation

Visual Studio Code

Install the self-contained Symfony Language Tools extension from the Visual Studio Marketplace:

code --install-extension symfony.language-tools

VSCodium users can install the matching .vsix package from GitHub Releases.

Add --pre-release to install a version with a prerelease suffix. See the Visual Studio Code guide for configuration and troubleshooting.

Neovim

Install symfony-lsp from a standalone release or with Mason when available, then enable the nvim-lspconfig configuration:

vim.lsp.enable('symfony_lsp')

See the Neovim guide for installation, workspace trust, configuration and troubleshooting.

Zed

Install the Symfony Language Tools extension from Zed's Extensions page. The extension downloads the latest stable server automatically and runs alongside a general PHP language server on Linux and macOS. Windows is not supported.

See the Zed guide for installation, workspace trust, configuration and troubleshooting.

OpenCode

Install symfony-lsp from a standalone release, then configure it as a custom language server. OpenCode can use Symfony-aware diagnostics and navigation while its coding agent works on the project.

See the OpenCode guide for configuration, workspace trust, supported features and platform limitations.

Standalone Server

Download the archive for your platform from GitHub Releases. Extract the self-contained symfony-lsp language server. On Unix, verify the server before configuring your Language Server Protocol client:

./symfony-lsp --version

See the standalone installation guide for supported platforms, checksum verification and source installation.

Continuous Integration

Run Symfony diagnostics against saved project files without an editor or LSP client. Symfony CLI manages and caches the latest stable compatible executable:

symfony lsp:check

You can also invoke a standalone installation directly with symfony-lsp check. The checker supports deterministic human, JSON, GitHub Actions, GitLab Code Quality and SARIF output, code-based failure policies, source-only analysis and occurrence-specific baselines. Running it with runtime indexing enabled executes application code. See the headless diagnostics guide for configuration, CI examples and stable exit statuses.

Requirements

Symfony Language Tools supports maintained Symfony versions listed in Symfony's release metadata. Runtime indexing requires the application's Composer dependencies to be installed and a PHP command compatible with its Symfony version.

Documentation

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.

About

Official Symfony language tools for VS Code, Zed, Neovim, and other editors

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

146 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages