oraios/serena · error · RuntimeError
Unsupported phpantom_version '{version}'. Known bundled vers
Error message
Unsupported phpantom_version '{version}'. Known bundled versions: {sorted_versions} What it means
Serena's PHPantom dependency provider downloads a pinned, bundled phpantom_lsp release. When ls_specific_settings['php_phpantom']['phpantom_version'] names a version not present in _PHPANTOM_RUNTIME_DEPENDENCIES_BY_VERSION (currently only '0.8.0'), _create_phpantom_dependencies raises this RuntimeError before any download is attempted. It is a fail-fast guard against typos or future version overrides the library does not yet bundle.
Source
Thrown at src/solidlsp/language_servers/phpantom.py:107
),
RuntimeDependency(
id="phpantom_lsp",
description="PHPantom language server for Windows (x64)",
url="https://github.com/PHPantom-dev/phpantom_lsp/releases/download/0.8.0/phpantom_lsp-x86_64-pc-windows-msvc.zip",
platform_id=PlatformId.WIN_x64.value,
archive_type="zip",
binary_name="phpantom_lsp.exe",
sha256="17e23af816fc7ec695fe716f6209df6b0eafcec2fdafb5d9d72e2b352d5ddf83",
allowed_hosts=PHPANTOM_ALLOWED_HOSTS,
),
)
}
def _create_phpantom_dependencies(version: str) -> RuntimeDependencyCollection:
dependencies = _PHPANTOM_RUNTIME_DEPENDENCIES_BY_VERSION.get(version)
if dependencies is None:
raise RuntimeError(
f"Unsupported phpantom_version '{version}'. "
+ f"Known bundled versions: {', '.join(sorted(_PHPANTOM_RUNTIME_DEPENDENCIES_BY_VERSION))}"
)
return RuntimeDependencyCollection(dependencies)
class PHPantomServer(SolidLanguageServer):
"""
Provides PHP specific instantiation of the LanguageServer class using PHPantom.
PHPantom is an open-source PHP language server written in Rust.
It is an experimental alternative to Intelephense, which remains the default PHP language server.
You can pass the following entries in ls_specific_settings["php_phpantom"]:
- ls_path: path to a pre-installed phpantom_lsp binary
- phpantom_version: override the pinned PHPantom version downloaded by Serena
- ignore_vendor: whether to ignore directories named "vendor" (default: true)
"""View on GitHub (pinned to 7fcbca7e62)
Solutions
- Remove the phpantom_version key (or set it to '0.8.0') so the pinned default is used.
- Check the message's 'Known bundled versions' list and pick one of those exact strings.
- Install phpantom_lsp yourself and put it on PATH (or set ls_path); a system-installed binary bypasses the bundled version lookup entirely.
- Upgrade Serena to a version that bundles the newer PHPantom release.
Example fix
// before (Serena config)
"ls_specific_settings": { "php_phpantom": { "phpantom_version": "0.9.0" } }
// after
"ls_specific_settings": { "php_phpantom": { "phpantom_version": "0.8.0" } } Defensive patterns
Strategy: validation
Validate before calling
settings = serena_settings.get('ls_specific_settings', {}).get('php_phpantom', {})
version = settings.get('phpantom_version', '0.8.0')
known = {'0.8.0'} # mirror _PHPANTOM_RUNTIME_DEPENDENCIES_BY_VERSION keys
if version not in known:
raise ValueError(f"phpantom_version {version!r} not bundled; known: {sorted(known)}") Type guard
def is_bundled_phpantom_version(v: object) -> bool:
return isinstance(v, str) and v in {'0.8.0'} Try / catch
try:
server = SolidLanguageServer.create('php', repo_root, settings)
except RuntimeError as e:
if 'Unsupported phpantom_version' in str(e):
settings['ls_specific_settings']['php_phpantom'].pop('phpantom_version', None)
server = SolidLanguageServer.create('php', repo_root, settings)
else:
raise Prevention
- Don't set phpantom_version unless you specifically need a non-default pinned release.
- Keep the override value in sync with the 'Known bundled versions' reported by the error or the module's DEFAULT_PHPANTOM_VERSION.
- Prefer putting your own phpantom_lsp on PATH / ls_path to decouple from bundled pins.
When it happens
Trigger: Setting ls_specific_settings['php_phpantom']['phpantom_version'] to any value other than '0.8.0' (e.g. '0.7.0', '0.9.0', 'latest') when phpantom_lsp is not already on PATH, so the bundled-download path in _get_or_install_core_dependency runs.
Common situations: Typo in the version string; assuming any upstream GitHub release version is supported; copying a newer version from the PHPantom releases page before Serena has bumped DEFAULT_PHPANTOM_VERSION and added the pinned sha256/URL entries.
Related errors
- Invalid language server: '{orig_language_str}'.\nValid value
- Context file not found: {path.resolve()}
- Cannot use both fixed_tools and excluded_tools/included_opti
- Unknown language backend '{backend_str}': valid values are {
- Invalid line_ending: {value!r}. Valid values are: {valid}
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/5731f211a778fed9.
Report an issue: GitHub.