Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129030 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 3F4CB1A00BC for ; Fri, 31 Oct 2025 14:48:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761922093; bh=lGFjE1XNtPtWN4eARyNCpfkK/jmIRvNlEV/fq3d6Dy4=; h=References:In-Reply-To:From:Date:Subject:To:From; b=eFQMVjqsoZSVls9SrYyC2FbjHwZ2avR8jMU4y3Zr9r/rAoSOA0KM8t3YVIGAPrOzu fW7UehJhRIYamUv+LLipJi3Hx6s63dKRZ0636FggJ71sYxwWyvXdWGwIcsBEL3hI90 HKUvSs4LKXA4P/6Ghger4pkU3PoH802fhcgf7FWzk70LNb8od9P4pfBxZvOE3yMGjt KKTYiuLy58PRHoi2e5kxJ+KSNzvz1L7hbAAD5CBCqmSvx/NawCwL2en6hbXKmvXslJ zcY9IQw4F9zxu3IGA+SYBOERIq4Fn4xOm0on1GVO5eJHpIHZKoXu8XkCf/DZK5iySj K2eNvfX8s/3Rg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 19B83180056 for ; Fri, 31 Oct 2025 14:48:13 +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-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 14:48:12 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-591eb980286so2601331e87.2 for ; Fri, 31 Oct 2025 07:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761922086; x=1762526886; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=mdstbjuzrbdpABwCNqUJzbpzBkfEiJWBXotY3RoXaPk=; b=BhH2Tbd5KzeuAq0zTDTbxigxf/APd2oqQoncoLwX0KRlyo+ONqe8Y4Pl+MVpJUlKAD xT8VcHq3kiFmL647JdX7yFPYgX49jLWQNpmxHh75eHxYKAe1Fqz6DslLoPDInbXETGWp CNR1iR1FJBk2oHAZQLSuYO/UoVB5WbasSKzlCbvWGSxy/Z24/2BnxnAzTr9VZHpJyxcZ imJJE+mF5BqSxbQK5ySx9kvwY6E/0OGLSaPjAw6ppSTaKOXQ1qa1cmUrH7lVTe75mw/6 v8SU5wHc/todqPxse+sURA/xBJMCAxVBVz0zkN+lZaKHfrgrDHelu0lQx7KnyCxF195k U5aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761922086; x=1762526886; h=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=mdstbjuzrbdpABwCNqUJzbpzBkfEiJWBXotY3RoXaPk=; b=jUgB03h9W1ysUNrZlPSTNp+Y4k50MZ/SmXIMzyBKSozF0Y4ilu2OgjW+zNwMbBX2jy OSY9AEWwiC1GzvFxRZm2Kr+DQ4ZkRMaR2hYPj51UiW7pv5ePhEeMzMYU6x02k0E+185L NzM3aCnp4Xz32hSRVlBxFYrlLpFqHoxrSUxgu9YG7c7UuYcv+wrHarsU0D/XK9ynbbf0 Vv8sxqNtaLfc8Q8OZFOqz8HltmQKdYMM79wZCronLzqmAt+WbhZluyD6pTvd9D8/JrmX eEvRprJTzHZR5ouT0eN0tzbP11CoAQnVvQHmvNzvEoVJOjN4sKzcUyCkN2T0IDa3qNot 053Q== X-Gm-Message-State: AOJu0Yzh6g+CoUJRnFy0dRmsBSwbzck6x7L8Uc9xX6qPqJwdEKnabMOH eYQMzUB9buoCQM9UEeQK6yekQOuumUx/sOppMqw/nS7ouHa5vvFRkG972kq1+mzx/vlVRBtbq4O /c6Ms5cofMbyefZS4hEmyhgV7keC+hbbabg== X-Gm-Gg: ASbGncuGSgxHNh3FkY/Nww/bOyLvy8JjN+hh+J6buuxDXDxdSh44uy5u6MaScw1pDvS DeAThF2vtL+/4d1cgYBBPan7+To49guh9XfflsqVky80XppuPavFC6/DyO+PE6kYq/FzzRgApg/ LhObGCmHbirWVf+NsZyiV+fU90O3Cjw9yem0oxyKq/RFMHQ5ZjEIdxnFaYaHeAN2XXZg8+i3Bsd sfKjomuJB93y/kcoRoyLHPYqnXJvbr5nYAV1y9Wbl5V5w2xd5Mufjw5v49kZshcA68PZ9aYbEn8 l4AVOMDTny+hirY= X-Google-Smtp-Source: AGHT+IEblgLnBcEKdk2he1zOacFLuqy+nY8hCfN68GaxtoULFC8FS+GbMVcqgiVg/hVSMM717ocLFvY4aVfrdDVLuOc= X-Received: by 2002:a05:6512:3d86:b0:592:fc68:5b94 with SMTP id 2adb3069b0e04-5941d3b3892mr1389780e87.0.1761922085810; Fri, 31 Oct 2025 07:48:05 -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 15:47:28 +0100 X-Gm-Features: AWmQ_blLbA7kNO0pxUZRuYMC7bHOkbkw8hzAOkHt95DkcRiNvDND-IW716ikTus Message-ID: Subject: [PHP-DEV] Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation) To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000000bf7f00642757488" From: danjessen@gmail.com (Dan Jessen) --0000000000000bf7f00642757488 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 tools 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. 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. *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 intelli= gence. 2. Editor Independence PHP is often associated with PhpStorm because of its strong analysis features. An official LSP would level the playing field, enabling advanc= ed 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, 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 defini= ng a common standard =E2=80=94 potentially leveraging or integrating with those = efforts. *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 exte= nsion, 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 RF= C to outline possible goals, structure, and implementation paths. 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. Best regards, Dan --0000000000000bf7f00642757488 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone,

I=E2=80=99d like to start a discussion abou= t the potential for PHP to have an official Language Server, implementing t= he Language Server Protocol (LSP) =E2=80=94 similar to what other programmi= ng languages already provide (e.g. Go=E2=80=99s gopls, Elixir=E2=80=99s Exp= ert, 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 f= orm it could take if we agreed it=E2=80=99s worth pursuing.

Backg= round / Motivation
Currently, PHP developers rely on various third-p= arty or editor-specific language servers, including Psalm, Intelephense, an= d phpactor. These tools are impressive, but they differ in capabilities, ma= intenance status, and licensing (some are commercial).
Additionally, sev= eral editors (e.g. VS Code, PhpStorm) implement their own non-standardized = integrations.

By contrast, many modern languages now provide an offi= cial language server as part of their toolchain. For example:
  • Go= : gopls
  • Elixir: Expert (official successor to the community-built E= lixirLS)
  • Rust: rust-analyzer
  • TypeScript: TypeScript Server<= /li>
These servers improve consistency, tooling integration, and access= ibility =E2=80=94 independent of any specific IDE or vendor.

Why = PHP Could Benefit
  1. Toolchain Completeness
    A programming la= nguage should ideally include its own ecosystem of core tools =E2=80=94 inc= luding 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. Standa= rdization
    A unified and standardized LSP implementation would reduce fra= gmentation and improve interoperability across IDEs and plugins.
  4. Ac= cessibility and Onboarding
    Lowering the barrier for new developers by pr= oviding consistent, out-of-the-box editor support.

Existing= Building Blocks
The PHP runtime already provides components that co= uld serve as a foundation =E2=80=94 e.g. php -l for syntax checking, reflec= tion APIs, AST via php-ast, and insights from static analysis tools like Ps= alm or PHPStan.

This wouldn=E2=80=99t necessarily mean rewriting exi= sting tools, but defining a common standard =E2=80=94 potentially leveragin= g or integrating with those efforts.

Next Steps
I=E2=80=99= m not currently in a position to build such a server myself, but I=E2=80=99= d 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 addit= ion, PECL extension, or standalone PHP project under the official organizat= ion.
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 pa= ths.

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
--0000000000000bf7f00642757488--