{"record":{"id":"5731f211a778fed9","repo":"oraios/serena","slug":"unsupported-phpantom-version-version-known-bu","errorCode":null,"errorMessage":"Unsupported phpantom_version '{version}'. Known bundled versions: {sorted_versions}","messagePattern":"Unsupported phpantom_version '(.+?)'\\. Known bundled versions: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/phpantom.py","lineNumber":107,"sourceCode":"        ),\n        RuntimeDependency(\n            id=\"phpantom_lsp\",\n            description=\"PHPantom language server for Windows (x64)\",\n            url=\"https://github.com/PHPantom-dev/phpantom_lsp/releases/download/0.8.0/phpantom_lsp-x86_64-pc-windows-msvc.zip\",\n            platform_id=PlatformId.WIN_x64.value,\n            archive_type=\"zip\",\n            binary_name=\"phpantom_lsp.exe\",\n            sha256=\"17e23af816fc7ec695fe716f6209df6b0eafcec2fdafb5d9d72e2b352d5ddf83\",\n            allowed_hosts=PHPANTOM_ALLOWED_HOSTS,\n        ),\n    )\n}\n\n\ndef _create_phpantom_dependencies(version: str) -> RuntimeDependencyCollection:\n    dependencies = _PHPANTOM_RUNTIME_DEPENDENCIES_BY_VERSION.get(version)\n    if dependencies is None:\n        raise RuntimeError(\n            f\"Unsupported phpantom_version '{version}'. \"\n            + f\"Known bundled versions: {', '.join(sorted(_PHPANTOM_RUNTIME_DEPENDENCIES_BY_VERSION))}\"\n        )\n    return RuntimeDependencyCollection(dependencies)\n\n\nclass PHPantomServer(SolidLanguageServer):\n    \"\"\"\n    Provides PHP specific instantiation of the LanguageServer class using PHPantom.\n\n    PHPantom is an open-source PHP language server written in Rust.\n    It is an experimental alternative to Intelephense, which remains the default PHP language server.\n\n    You can pass the following entries in ls_specific_settings[\"php_phpantom\"]:\n        - ls_path: path to a pre-installed phpantom_lsp binary\n        - phpantom_version: override the pinned PHPantom version downloaded by Serena\n        - ignore_vendor: whether to ignore directories named \"vendor\" (default: true)\n    \"\"\"","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/phpantom.py#L89-L125","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (Serena config)\n\"ls_specific_settings\": { \"php_phpantom\": { \"phpantom_version\": \"0.9.0\" } }\n// after\n\"ls_specific_settings\": { \"php_phpantom\": { \"phpantom_version\": \"0.8.0\" } }","handlingStrategy":"validation","validationCode":"settings = serena_settings.get('ls_specific_settings', {}).get('php_phpantom', {})\nversion = settings.get('phpantom_version', '0.8.0')\nknown = {'0.8.0'}  # mirror _PHPANTOM_RUNTIME_DEPENDENCIES_BY_VERSION keys\nif version not in known:\n    raise ValueError(f\"phpantom_version {version!r} not bundled; known: {sorted(known)}\")","typeGuard":"def is_bundled_phpantom_version(v: object) -> bool:\n    return isinstance(v, str) and v in {'0.8.0'}","tryCatchPattern":"try:\n    server = SolidLanguageServer.create('php', repo_root, settings)\nexcept RuntimeError as e:\n    if 'Unsupported phpantom_version' in str(e):\n        settings['ls_specific_settings']['php_phpantom'].pop('phpantom_version', None)\n        server = SolidLanguageServer.create('php', repo_root, settings)\n    else:\n        raise","preventionTips":["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."],"tags":["python","version-pinning","configuration","language-server"],"backgroundTag":"unsupported-version","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}