Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129036 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 3DB171A00BC for ; Fri, 31 Oct 2025 23:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761954330; bh=yo2KjkbP+ecTtARsmFKMWyccNEg+Ye/mZTdvumrei7E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Vf/uaXqpucuDy/CmKUOQqUeKPH3P0v+6Gt9hWWBTuxu1BivEX+aroGzZVeAmkHqqu KAPmDbwxdXJ44bVq/5HHPrZhGD2L0ye96wnWAC52XQho2bDcpeAWElfJIgt6KeKnT4 cpoe6l/eOwKMpeFzheyZlA0JMgZGpgNndq0I69rOq47CYEr8KJ9kBIqvSH4vdjHR2b FiBekN5meoVFaYAd+ef7cXBlcm+4n5VrohfZn2SqdvGVvK5j+xY8SOWvWmhJsAPdAi FlmC6MZB5CIOx+HWHbFknwzhhGgH6lzsC63Vnjc8kCweLus/c59iIUVRosnLQ2XLXd +vY5VVX81gtGQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D876718006A for ; Fri, 31 Oct 2025 23:45:25 +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_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (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 23:45:12 +0000 (UTC) Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-7c68bee554cso1609161a34.0 for ; Fri, 31 Oct 2025 16:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761954307; x=1762559107; 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=amFInIYJhPPuyIf32vdciSTqhidYq6O8YB/IfwQIDNI=; b=MnG0Qx4vEaStBovwkqD1Uk9h+/E1n7+RsFhmZx+Y1N05aQrli5intSWnkdCBnCcVCO QbBTP46domhFkW/pi23Vm+KdQnrQjqdDwnc77gIKGhIozUHd1dpu8IzVgGkfz514shee /u507vxkGS7bSx2dz/2Pgd/jyZIkxsDQQnOU0IYQ1aUR1ovgNrt9kRkFZg4tihgIjCuJ TYgPDQNO7WhATXbGwoc8YLhDJOX0j7zn4QuOIUmDE9MK44w1Y2F3h+CGCRTtYcucfx4z V1dRk2XFBuko+BLluTmp7lxiY2Ya+EALEZvJWHePj2KJyP87laLS4u7oNOT5+qY8as9Y KAhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761954307; x=1762559107; 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=amFInIYJhPPuyIf32vdciSTqhidYq6O8YB/IfwQIDNI=; b=BVdeWTgsnRUXf6yVIZKKRdjLbkPrO05ka1zzCz4Fz2/jiWeLzeVL+6g+IeYwGh7REJ aNWk5Ir98lltlzLPmaHcWCOVdPmltnJgVRaZPfE8VMLSmgBicKPR6GiHvQSUN++bo70K iUL3Nr/L7hgh5+kBkIW0B/DFraQA+iH3oOcvAThhDQljWMYhm9BgqowWGjb6yk+YQ6Vi UFnuGBOim5Z/k/jPJj5crB+7qvOudj/X/Gzj016BKw6WIBS3DJsCkIQQqe6VWUAEKzez p7eX61S5yodakYfnAJ9dl1edBUzC84kaiVGtiy9MS+/HQFnu5aTuKAisnnrL32hsQEwv sswQ== X-Gm-Message-State: AOJu0Ywzgl4OWwo3ZWUsxbShTNhaINy1V3DS7Q7sPT189FzaThC0cdT3 J6etp36P6e/ghy3hzEnf4pZfKy5omnjICLB17k0YdEqwRRDZLzAGGSLaDAEL+UmmtGiK2CZRzYk iIs1lMu+3hLuIlfKRgftopEALXjaWFe0= X-Gm-Gg: ASbGncv5oVG+c4yTkehpHPtC3eRnEkNZ+bDwjqnjxkluCcLF1H+ghNs21apWVqZ2DTH YdK4B5EMkoelP5ws+NWhCVYYIUGxdjzqfIqb+ssD95wB25S2o6nQ7BECqZtV2jXrgr8S2XSH72l di8MxPsNgPAtvgmRi9sehTH8b3Q3e4oPuHEPsNbFoLn7uuVFon/Q0w6VhxWA+mkPQB+m6oLqUTZ n0Df+QnTHyMeDdSOAXKqKTIXUHACWEQuWuimaQTlDlAWPVltLeKmqcKaJZcvBfW9LWKIy4vWYAT r16ullIln4cUsUPLMbOAdYoayq8= X-Google-Smtp-Source: AGHT+IEA7dhoXHJZQhAtRe1Cguw1Pvn/cqHyOO5sDOyErp3/GWkiMqIMSYr52lAsfnqoeid5aP0EwbcaW4+ZnUxXVys= X-Received: by 2002:a05:6808:2198:b0:437:dade:463f with SMTP id 5614622812f47-44f95fd5661mr2443968b6e.34.1761954306723; Fri, 31 Oct 2025 16:45:06 -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: Fri, 31 Oct 2025 17:44:56 -0600 X-Gm-Features: AWmQ_blMBFnQvkJoVMAmtuIfEUgiXCy6JQmarFAq-n9IbtZCRwy0oTQIuAAIGGM Message-ID: Subject: Re: [PHP-DEV] Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation) To: Dan Jessen Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000009013ce06427cf4b2" From: hamiegold@gmail.com (Hammed Ajao) --0000000000009013ce06427cf4b2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 31, 2025, 8:48=E2=80=AFa.m. Dan Jessen wr= ote: > Hello everyone, > > I=E2=80=99d like to start a discussion about the potential for PHP to hav= e 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.). > > 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. > > *Background / Motivation* > Currently, PHP developers rely on various third-party or editor-specific > language servers, including Psalm, Intelephense, and phpactor. These tool= s > are impressive, but they differ in capabilities, maintenance status, and > licensing (some are commercial). > Additionally, several editors (e.g. VS Code, PhpStorm) implement their ow= n > non-standardized integrations. > > By contrast, many modern languages now provide an official language serve= r > 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. > > *Why PHP Could Benefit* > > 1. Toolchain Completeness > A programming language should ideally include its own ecosystem of > core tools =E2=80=94 including syntax checking, testing, and language = intelligence. > 2. Editor Independence > PHP is often associated with PhpStorm because of its strong analysis > features. An official LSP would level the playing field, enabling adva= nced > features in any editor that supports the protocol. > 3. Standardization > A unified and standardized LSP implementation would reduce > fragmentation and improve interoperability across IDEs and plugins. > 4. Accessibility and Onboarding > Lowering the barrier for new developers by providing consistent, > out-of-the-box editor support. > > > *Existing Building Blocks* > The PHP runtime already provides components that could serve as a > foundation =E2=80=94 e.g. php -l for syntax checking, reflection APIs, AS= T via > php-ast, and insights from static analysis tools like Psalm or PHPStan. > > This wouldn=E2=80=99t necessarily mean rewriting existing tools, but defi= ning a > common standard =E2=80=94 potentially leveraging or integrating with thos= e efforts. > > *Next Steps* > I=E2=80=99m not currently in a position to build such a server myself, bu= t 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 ex= tension, > 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, structure, and implementation paths. > > Thanks for reading =E2=80=94 I=E2=80=99d really appreciate your thoughts,= pointers to > prior work, or any guidance on how best to take this forward. > > Best regards, > Dan > I actually had a similar idea like 2 years ago and started working on a golang port of nikics parser. Its still a side project and not yet well documented, but it works and its significantly faster. I can make it presentable and publish it this weekend if theres any interest in going this route Cheers, Hammed. > --0000000000009013ce06427cf4b2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Fri, Oct 31, 2025= , 8:48=E2=80=AFa.m. Dan Jessen <d= anjessen@gmail.com> wrote:
<= div dir=3D"ltr">
Hello everyone,=

I=E2=80=99d like to start a discussion about the potential for PHP = to have an official Language Server, implementing the Language Server Proto= col (LSP) =E2=80=94 similar to what other programming languages already pro= vide (e.g. Go=E2=80=99s gopls, Elixir=E2=80=99s Expert, etc.).

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 w= e agreed it=E2=80=99s worth pursuing.

Background / Motivation=
Currently, PHP developers rely on various third-party or editor-specifi= c language servers, including Psalm, Intelephense, and phpactor. These tool= s are impressive, but they differ in capabilities, maintenance status, and = licensing (some are commercial).
Additionally, several editors (e.g. VS = Code, PhpStorm) implement their own non-standardized integrations.

B= y contrast, many modern languages now provide an official language server a= s 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 inde= pendent of any specific IDE or vendor.

Why PHP Could Benefit<= br>
  1. Toolchain Completeness
    A programming language should ideally = include its own ecosystem of core tools =E2=80=94 including syntax checking= , testing, and language intelligence.
  2. Editor Independence
    PHP is= often associated with PhpStorm because of its strong analysis features. An= official LSP would level the playing field, enabling advanced features in = any editor that supports the protocol.
  3. Standardization
    A unified= and standardized LSP implementation would reduce fragmentation and improve= interoperability across IDEs and plugins.
  4. Accessibility and Onboar= ding
    Lowering the barrier for new developers by providing consistent, ou= t-of-the-box editor support.

Existing Building BlocksThe PHP runtime already provides components that could serve as a foundat= ion =E2=80=94 e.g. php -l for syntax checking, reflection APIs, AST via php= -ast, and insights from static analysis tools like Psalm or PHPStan.
This wouldn=E2=80=99t necessarily mean rewriting existing tools, but defin= ing a common standard =E2=80=94 potentially leveraging or integrating with = those efforts.

Next Steps
I=E2=80=99m not currently in a p= osition to build such a server myself, but I=E2=80=99d like to open a discu= ssion 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, o= r 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 out= line possible goals, structure, and implementation paths.

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

Best = regards,
Dan

<= /div>

I actually had a similar= idea like 2 years ago and started working on a golang port of nikics parse= r. Its still a side project and not yet well documented, but it works and i= ts significantly faster.=C2=A0

I can make it presentable and publish it this weekend if theres any = interest in going this route

Cheers,=C2=A0
Hammed.
--0000000000009013ce06427cf4b2--