Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129032 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 0D3A41A00BC for ; Fri, 31 Oct 2025 17:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761931052; bh=7fmp7Zly/xowsNL4UVwoVGIGhw0ONLEqCDXVS5ZdJpo=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=dA4CHW0xPl7QQ69fhDqj1jcZ6yMOEuhKwe7waTBfWUN8xAmFTSDddmRWgjBI0GNAH //tc2H3XwbYoKbLTgPu7fpYnk3Z4fAux2+yLcE+F73UEl2IUUglsTOpRGz41DKWCYs gRjwJXk4SKwBdU41l3s7pR1X5q6qyA9dZrez2yWZqVgyRdAF6edJZb4KnLA6azhT2A 7liLDnf7B7eyrQyeimIvv1XvWMTnqyrzBpKK6eT+b32sLyJjTd69O+yt/hvIOA5AU9 enIvBCwPxybXJqiHkFk3xX0DoYZ2pGeQ4GYKNSqz2banC5ABDnPyKQFGMu++b8+jjz BQ52y8zuTr9pA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 73803180055 for ; Fri, 31 Oct 2025 17:17:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 31 Oct 2025 17:17:31 +0000 (UTC) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-7817c2d909cso31754517b3.1 for ; Fri, 31 Oct 2025 10:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; s=google; t=1761931045; x=1762535845; darn=lists.php.net; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=w29O8uDC7qLx2Rv84+rs7xkJillr+clzqbg3Hue4fKI=; b=cry1edsCAnxkrwrJkAzRTa3mEWHQRxggEk80qHi5P8jmbTlSWM4c2ODe/DmdVvqLnz V5e3gRRcWI5kOYQDLImuVwVbOrYWGNmIsXPwe/bXuSG85fpu48nUuzoc576COvkVvubu mKAnnyqAnj1YSl8dRW0GB/KRmx4WzbUysx8ylG01X17tIy979gYYniTMErOU9S5nDqci JJ8rVKRtDYOrXAD1dkLI5o53BIutpxeNo44cMG0cOntp1pJtR72nI5OF0/Ixd9nwaesS IX2kW8A8B9xP/aE7btUKssS0vyuLoBzQLcnySo/IHLM4vFK2b9d8SObgcdzNsWx38Tat 7pxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761931045; x=1762535845; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w29O8uDC7qLx2Rv84+rs7xkJillr+clzqbg3Hue4fKI=; b=Q7tau3jtha8My8WdM4YInbpgUbKVAlkCLgeTNfDMcSGNM/5RNvCQ9QwHfzbH9eTlIP IBUrT37wxQ6UegTCMSn3yqVbk8iJHpxECio/hzOoRiCPy+ZCUIHIRV1ftDyEFXgfYwB5 kPU0zPrVw+gNro26GK9CIT4eyUySBpEl2S9kd5qhnwLnGbWrvCl9dsmGKeZZ5wVoqzC1 dSQwU942iA+Gts72fcRFL4Y9Masnu7Zkbkh6XR0VbNCbNEBSyrZjHpGDBGTQI8ftdzvf ZPSMryZFuZwhYQ0rQ2MfW2tVzwY45L1mn7rTx/ETghOCQCTKZp/OQQTpBJ6t5jU5cE6V Fj2Q== X-Gm-Message-State: AOJu0Yy6H5ZhRA6QrhMpALzZCzToXU86v6i0U+9H7oA3qbUfuKZKe8Vd lDNNtxw80xxc9aoi7xZUFtcFisPsGCOyJBvf5mSUYwkL0ADKyqMpcZjwXv9oFxyxjg== X-Gm-Gg: ASbGncvyba/c5U/mBA6TrvZEpsU8uuxm0Mw9ktcI1QXKxRXR8eGPB7QGJVehb9QaiV4 m8IGV+3YXu81Y+7qHAraF0s4yqvKqg4FBMDFJqR+oO3XvX7UlCDG3XzX9lhIKkU3NfIqfsB/vIL 4blWgp77z5u8a1Oewv8v8wpZ/iGBsfZAt6WjhnWn6CBi7B8eKroVvxkpg27rGqw/xytsfhpGGqX 7v/J0pBCuqLURKDm5uheg0Cjr5Ftj92oNVmeuncy3SwtnmQq2U2mrACJ/j6V1qUq66xbmQBMF45 7EKI+/bIGDlHWI+hNxwnYL8r471kd8l/XpEfp2JUKNQsqQqf4soIqNiiG9zzFZtrxYJHQb5sQYA RQTu0wTVyE1dEGyaLDkubHd3Jb2qLmfKM7a1XAjxwVnMJntuZeK9HCJTMDTcqvqWWxHRRCkoa8x 4n46xWd8WpmBl51/LX+VXQxNJLeA/l4w== X-Google-Smtp-Source: AGHT+IHNaQc1xrfCTihukB8U9Ip8zuGYQT1Ca7nOLU0JrI7HeQnv+HIHGFEy9MrLxtAONFfHCMlouw== X-Received: by 2002:a05:690c:7206:b0:721:6b2e:a08a with SMTP id 00721157ae682-786484df498mr66460857b3.37.1761931045173; Fri, 31 Oct 2025 10:17:25 -0700 (PDT) Received: from smtpclient.apple ([2600:1005:b05b:8a:21bd:41a:408:36a8]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7864c669b9esm6764517b3.45.2025.10.31.10.17.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Oct 2025 10:17:24 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-DD8B4CAE-33CE-4208-96D4-70646E9F5BD3 Content-Transfer-Encoding: 7bit Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow Mime-Version: 1.0 (1.0) Subject: Re: [PHP-DEV] Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation) Date: Fri, 31 Oct 2025 13:17:12 -0400 Message-ID: <31718698-00FA-4B73-ACE7-5ECA00636139@benramsey.com> References: Cc: internals@lists.php.net In-Reply-To: To: Dan Jessen X-Mailer: iPhone Mail (22G100) From: ben@benramsey.com (Ben Ramsey) --Apple-Mail-DD8B4CAE-33CE-4208-96D4-70646E9F5BD3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Oct 31, 2025, at 10:50, Dan Jessen wrote: >=20 > =EF=BB=BF > Hello everyone, >=20 > I=E2=80=99d like to start a discussion about the potential for PHP to have= an official Language Server, implementing the Language Server Protocol (LSP= ) =E2=80=94 similar to what other programming languages already provide (e.g= . Go=E2=80=99s gopls, Elixir=E2=80=99s Expert, etc.). >=20 > This is not yet a formal RFC, but rather an exploration of whether there=E2= =80=99s community interest in such a concept, and what form it could take if= we agreed it=E2=80=99s worth pursuing. >=20 > Background / Motivation > Currently, PHP developers rely on various third-party or editor-specific l= anguage servers, including Psalm, Intelephense, and phpactor. These tools ar= e impressive, but they differ in capabilities, maintenance status, and licen= sing (some are commercial). > Additionally, several editors (e.g. VS Code, PhpStorm) implement their own= non-standardized integrations. >=20 > By contrast, many modern languages now provide an official language server= as part of their toolchain. For example: > Go: gopls > Elixir: Expert (official successor to the community-built ElixirLS) > Rust: rust-analyzer > TypeScript: TypeScript Server > These servers improve consistency, tooling integration, and accessibility =E2= =80=94 independent of any specific IDE or vendor. >=20 > Why PHP Could Benefit > Toolchain Completeness > A programming language should ideally include its own ecosystem of core to= ols =E2=80=94 including syntax checking, testing, and language intelligence.= > Editor Independence > PHP is often associated with PhpStorm because of its strong analysis featu= res. An official LSP would level the playing field, enabling advanced featur= es in any editor that supports the protocol. > Standardization > A unified and standardized LSP implementation would reduce fragmentation a= nd improve interoperability across IDEs and plugins. > Accessibility and Onboarding > Lowering the barrier for new developers by providing consistent, out-of-th= e-box editor support. >=20 > Existing Building Blocks > The PHP runtime already provides components that could serve as a foundati= on =E2=80=94 e.g. php -l for syntax checking, reflection APIs, AST via php-a= st, and insights from static analysis tools like Psalm or PHPStan. >=20 > This wouldn=E2=80=99t necessarily mean rewriting existing tools, but defin= ing a common standard =E2=80=94 potentially leveraging or integrating with t= hose efforts. >=20 > Next Steps > I=E2=80=99m not currently in a position to build such a server myself, but= I=E2=80=99d like to open a discussion around: > Whether this aligns with PHP=E2=80=99s roadmap and philosophy. > Any prior work or discussion on the topic. > The potential scope =E2=80=94 e.g., core toolchain addition, PECL extensio= n, or standalone PHP project under the official organization. > If there=E2=80=99s interest, I=E2=80=99d be happy to draft a more formal R= FC to outline possible goals, structure, and implementation paths. >=20 > Thanks for reading =E2=80=94 I=E2=80=99d really appreciate your thoughts, p= ointers to prior work, or any guidance on how best to take this forward. >=20 > Best regards, > Dan Would such a thing need to be in php-src, or could it be started as a separa= te code base? IOW, could this be an independent project maintained outside o= f internals and donated to the PHP project? Cheers, Ben --Apple-Mail-DD8B4CAE-33CE-4208-96D4-70646E9F5BD3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
= On Oct 31, 2025, at 10:50, Dan Jessen <danjessen@gmail.com> wrote:
=
=EF=BB=BF<= div dir=3D"ltr">
Hello everyone,

I=E2=80=99d like to start a discussion about th= e potential for PHP to have an official Language Server, implementing the La= nguage Server Protocol (LSP) =E2=80=94 similar to what other programming lan= guages already provide (e.g. Go=E2=80=99s gopls, Elixir=E2=80=99s Expert, et= c.).

This is not yet a formal RFC, but rather an exploration of wheth= er there=E2=80=99s community interest in such a concept, and what form it co= uld take if we agreed it=E2=80=99s worth pursuing.

Background / Mo= tivation
Currently, PHP developers rely on various third-party or edi= tor-specific language servers, including Psalm, Intelephense, and phpactor. T= hese tools are impressive, but they differ in capabilities, maintenance stat= us, and licensing (some are commercial).
Additionally, several editors (e= .g. VS Code, PhpStorm) implement their own non-standardized integrations.
By contrast, many modern languages now provide an official language ser= ver as part of their toolchain. For example:
  • Go: gopls
  • El= ixir: Expert (official successor to the community-built ElixirLS)
  • Ru= st: rust-analyzer
  • TypeScript: TypeScript Server
These serve= rs improve consistency, tooling integration, and accessibility =E2=80=94 ind= ependent of any specific IDE or vendor.

Why PHP Could Benefit<= br>
  1. Toolchain Completeness
    A programming language should ideally i= nclude its own ecosystem of core tools =E2=80=94 including syntax checking, t= esting, and language intelligence.
  2. Editor Independence
    PHP is oft= en associated with PhpStorm because of its strong analysis features. An offi= cial LSP would level the playing field, enabling advanced features in any ed= itor that supports the protocol.
  3. Standardization
    A unified and st= andardized LSP implementation would reduce fragmentation and improve interop= erability across IDEs and plugins.
  4. Accessibility and Onboarding
    L= owering the barrier for new developers by providing consistent, out-of-the-b= ox editor support.

Existing Building Blocks
The PHP r= untime already provides components that could serve as a foundation =E2=80=94= e.g. php -l for syntax checking, reflection APIs, AST via php-ast, and insi= ghts from static analysis tools like Psalm or PHPStan.

This wouldn=E2= =80=99t necessarily mean rewriting existing tools, but defining a common sta= ndard =E2=80=94 potentially leveraging or integrating with those efforts.
Next Steps
I=E2=80=99m not currently in a position to build s= uch a server myself, but I=E2=80=99d like to open a discussion around:
  • Whether this aligns with PHP=E2=80=99s roadmap and philosophy.
  • Any prior work or discussion on the topic.
  • The potential scope =E2=80= =94 e.g., core toolchain addition, PECL extension, or standalone PHP project= under the official organization.
  • If there=E2=80=99s interest, I=E2= =80=99d be happy to draft a more formal RFC to outline possible goals, struc= ture, and implementation paths.

    Thanks for reading =E2=80=94 I=E2=80=99= d really appreciate your thoughts, pointers to prior work, or any guidance o= n how best to take this forward.

    Best regards,
    Dan

    Would such a thing need to be in php-src, or cou= ld it be started as a separate code base? IOW, could this be an independent p= roject maintained outside of internals and donated to the PHP project?
    =

    Cheers,
    Ben

    = --Apple-Mail-DD8B4CAE-33CE-4208-96D4-70646E9F5BD3--