Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129046 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 769CE1A00BC for ; Sat, 1 Nov 2025 19:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762025761; bh=0sVsU1R93AFb1ewgbXCANPO1dVRW5CI3hFitDVpx53M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ipDkppo9uQQn82cnPbm2P+04dy4pYt3flgN8fJm5H70PD/HA3d+upTo5Us7yaCCcA /j1MQp/z6d250thFTzIf96BhFVVYwcJPZy61IAeec/QOAzuk3ZxroPIQzgKpLV4u46 6y+6Ul0wuY060cOC+kbaMNXMJJpyX7BnhkutmGLAakU9iMms5AoHMAMfBRj/MZLPn0 D3z4bfazVQJl809cILRuSlvfdnsAFHqcxTE3xgt7rsGlc/CiUsN/BeE2uaaDig4+6C PJ3SVnqbFlJkGGCkQZgCi5g6IUX0Q5TI1qqGVxoYrf2pnxlaVXFGtLHjIZeQih4KCe 2fZAIiXpYXRDg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1BAF31801D5 for ; Sat, 1 Nov 2025 19:36:00 +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,FREEMAIL_FROM, HTML_MESSAGE,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-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 ; Sat, 1 Nov 2025 19:35:49 +0000 (UTC) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-378ccb8f84aso36373251fa.3 for ; Sat, 01 Nov 2025 12:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762025743; x=1762630543; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fbQiVKes9gbaEoL0BXHQ4fWCsCVIDRPfIao8eaSOJXY=; b=hQrbZYg5HsykkskftKAiI/JbNpHrRNu7E0vPrjOJi0nI0thQojmMb8JhI5DnfTYnQR 8mP0aNJ04g43m/HJm9W+npR2EAa59sM1HJBzvj0uBq5HtNr+sTl8wYRxidSVEmxFmEG9 v58/nlecFxHYZAw9YIeP1e9JLVodnHo8oPacd+mBVMN/haXD2ydH2b1D5W6JfO/qKsiM 0ctEBpTawh1UnV26zk+eUheGCSZoduXsR6H76/UGlaqQMllSnBs0tTDTrCVLXa4dyrQj QhY9C65tusLb20RuhX93l8LkbEXyedfbFbdAMwd/GLS/9a0o6CT1KxYqRe2+GkVP1CSV bnMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762025743; x=1762630543; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fbQiVKes9gbaEoL0BXHQ4fWCsCVIDRPfIao8eaSOJXY=; b=DKmRPkvAk16Q7JV89SK1C8bz1p9gqwjuV86hGsX49TKQ5+31FhX+2KqVKSGdU3oJa3 Jd8MR6OCVXuFR/WSwBGl9BBrPzpv1l7YS2pkTW3w1VJoCoTOX7up0zgVKU22VMkTKiLZ AcBDQkR5zS0dsYecs2ckWh3u+pmyLUUz2BFWuwnu9UWwWl23inInyAiNwBRteLkqh/6/ 1z5Il0xJghvFf8cpkakw4MtlvVObP5yHSDdkONdeeyndFHSw3IA8BCdNA2dusFADTv+t Aro2Re8rssi/E4gz0sfSVRCn7JVRGUgPQK59vK0Jxusrr7v4K8ZpHKk+ICtrPIyb+Zvv MWwA== X-Gm-Message-State: AOJu0YzRRHPVsKLIl9RAhHiF7L8uTIazhw4wlx+A8mfpCn375GkSeYns tnGTlqWfs8mADGy9veQGIG7cbxxj6JWyEKpiv3hSLKxRnscYHJz9RGaMF1Scb1GACJEUm7/ynrj 3F7DYBthOfxjCfRuP9WvcQEBTWCte6F6DkA== X-Gm-Gg: ASbGncsdk+mIVs7mhzihs4EHfZVNfPMnPJzATCxOmNRdZHCJKYMgxA+p0+VeSywjJZ8 S5v6fvE9w2E2KvBfL1zV540c2cG/oF9Qf2vdyqqvthFuPaLa5+HwezFZu6hisD1onk+tdswoDEO +fNKDdlPKcgDXemxRXSlU1I3aaVo4jRqEXM1uoJ1FxWxanwWYqOhEuG5f6b+bvOSbTls32PLJxB iaOLdYBjUFI/pWKHSR0zVfApXxsH5Mgk7QHbV2okfVa56wWOOfbWfuNMmN/VKeaN0RbW7BntUYe WA5Qj0wK561kZ+s= X-Google-Smtp-Source: AGHT+IGqbpMHf9B7+AB510bq6FJne90iLichSaEzBhVvQoBXPyHjqvTNw6FvWdjHD4RL2UhY8D37hRHsdaY8v9UfkeY= X-Received: by 2002:a05:651c:19a5:b0:37a:2be2:4cae with SMTP id 38308e7fff4ca-37a2be24e68mr7658191fa.49.1762025742787; Sat, 01 Nov 2025 12:35:42 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 1 Nov 2025 20:35:31 +0100 X-Gm-Features: AWmQ_blJPKD7xV-uHvWcRDUVWbkMXwFzZY87Gw6gyXVLU1cldll8cbrBJK-7rfY Message-ID: Subject: Re: [PHP-DEV] Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation) To: Marco Pivetta Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000007be8ce06428d96c7" From: danjessen@gmail.com (Dan Jessen) --0000000000007be8ce06428d96c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Marco =E2=80=94 I agree that any official LSP should follow the PHP = spec closely and avoid adding new type semantics. The issue isn=E2=80=99t the lack of servers, but fragmentation. Psalm and P= hpactor differ in scope and design, while Phan=E2=80=99s LSP docs haven=E2=80=99t b= een updated in years and its Vim plugin is around seven years old. None are standardized or maintained alongside PHP itself. PhpStorm is an excellent IDE, but it=E2=80=99s premium =E2=80=94 and the fa= ct it=E2=80=99s the only consistently recommended option highlights a tooling gap. Developers using VS Code, Neovim, Emacs, or Sublime Text often get a very different experience. The Language Server Protocol exists to solve exactly this: as Tom Djenius de Vries put it, it turns the M=C3=97N problem (M editors =C3=97 N language= s) into M+N =E2=80=94 each only needs one integration point. A spec-aligned, officially maintained PHP LSP could unify that baseline and make PHP development more consistent and accessible across editors. Best, Dan On Sat, 1 Nov 2025, 11.35 Marco Pivetta, wrote: > On Fri, 31 Oct 2025 at 15:48, Dan Jessen wrote: > >> Hello everyone, >> >> I=E2=80=99d like to start a discussion about the potential for PHP to ha= ve 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.). >> > > Just reporting on existing language servers that already exist, and go wa= y > ahead of PHP in terms of supported type declarations. > > * > https://github.com/vimeo/psalm/blob/2b0ff73c8bed091af231a0a80ac109126c920= 83a/docs/running_psalm/language_server.md > * > https://github.com/phpactor/language-server/blob/e4934195cc1857ec3347a488= f3357b0f0df2d2bf/README.md > * > https://github.com/phan/phan/blob/5c25c548b2fb3755e5a01f320dfd96dcd19d850= b/README.md#features > > Note that the PHP spec is quite limited on more refined types (like > `int<1, max>` and such, as an example), so I wouldn't expect an "official= " > LSP to support it. > > Marco Pivetta > > https://mastodon.social/@ocramius > > https://ocramius.github.io/ > > --0000000000007be8ce06428d96c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Marco =E2=80=94 I agree that any= official LSP should follow the PHP spec closely and avoid adding new type = semantics.

The issue isn= =E2=80=99t the lack of servers, but fragmentation. Psalm and Phpactor diffe= r in scope and design, while Phan=E2=80=99s LSP docs haven=E2=80=99t been u= pdated in years and its Vim plugin is around seven years old. None are stan= dardized or maintained alongside PHP itself.

PhpStorm is an excellent IDE, but it=E2=80=99s premium= =E2=80=94 and the fact it=E2=80=99s the only consistently recommended opti= on highlights a tooling gap. Developers using VS Code, Neovim, Emacs, or Su= blime Text often get a very different experience.
The Language Server Protocol exists to solve exac= tly this: as Tom Djenius de Vries put it, it turns the M=C3=97N problem (M = editors =C3=97 N languages) into M+N =E2=80=94 each only needs one integrat= ion point.

A spec-aligne= d, officially maintained PHP LSP could unify that baseline and make PHP dev= elopment more consistent and accessible across editors.

Best,
Dan

On Sat, 1 Nov 2025, 11.35 Marco Pivetta, <ocramius@gmail.com> wrote:
On= Fri, 31 Oct 2025 at 15:48, Dan Jessen <danjessen@gmail.com> wro= te:
Hello everyone,

I= =E2=80=99d like to start a discussion about the potential for PHP to have a= n 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.).

Just reporting on existing language serve= rs that already exist, and go way ahead of PHP in terms of supported type d= eclarations.

*=C2=A0https://github.com/phpactor/lan= guage-server/blob/e4934195cc1857ec3347a488f3357b0f0df2d2bf/README.md

Note that the PHP spec is quite limited on more refined types (like=20 `int<1, max>` and such, as an example), so I wouldn't expect an= =20 "official" LSP to support it.

Marco Pivetta

<= a href=3D"https://mastodon.social/@ocramius" target=3D"_blank" rel=3D"noref= errer">https://mastodon.social/@ocramius

https://ocramius.gith= ub.io/=C2=A0
=C2=A0
--0000000000007be8ce06428d96c7--