<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: exakat, static analysis for PHP</title>
    <description>The latest articles on DEV Community by exakat, static analysis for PHP (@exakat).</description>
    <link>https://dev.to/exakat</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F483879%2F1da675e7-c7f9-4bfb-aab6-8b045aa44711.png</url>
      <title>DEV Community: exakat, static analysis for PHP</title>
      <link>https://dev.to/exakat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/exakat"/>
    <language>en</language>
    <item>
      <title>PHP Meets AI: The Official MCP SDK Adds Support for the Stateless 2026-07-28 Spec</title>
      <dc:creator>exakat, static analysis for PHP</dc:creator>
      <pubDate>Tue, 15 Sep 2026 15:06:41 +0000</pubDate>
      <link>https://dev.to/exakat/php-meets-ai-the-official-mcp-sdk-adds-support-for-the-stateless-2026-07-28-spec-4je5</link>
      <guid>https://dev.to/exakat/php-meets-ai-the-official-mcp-sdk-adds-support-for-the-stateless-2026-07-28-spec-4je5</guid>
      <description>&lt;p&gt;Web development and AI keep moving closer together, and PHP is part of that. On July 28, 2026, the Model Context Protocol (MCP) shipped its latest specification, 2026-07-28. The official PHP SDK, available at &lt;a href="https://github.com/modelcontextprotocol/php-sdk" rel="noopener noreferrer"&gt;github.com/modelcontextprotocol/php-sdk&lt;/a&gt;, has been adding support for it. PHP developers can now build MCP servers and clients that work with both the new stateless protocol and earlier revisions.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is MCP?
&lt;/h3&gt;

&lt;p&gt;The Model Context Protocol is an open standard for connecting AI applications to external tools and data sources. An MCP server exposes capabilities such as tools, resources, and prompts. An MCP client, usually part of an AI application, discovers and uses them. This lets an AI assistant work with your files, databases, and APIs through one common interface instead of a custom integration for each.&lt;/p&gt;

&lt;p&gt;MCP specifications are named by release date rather than version number. The 2026-07-28 release is the fifth spec release and one of the most significant so far.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's New in the 2026-07-28 Specification?
&lt;/h3&gt;

&lt;p&gt;The headline change is a &lt;strong&gt;stateless protocol core&lt;/strong&gt;. MCP was previously a stateful, bidirectional protocol. Every connection began with an initialize handshake, and remote servers tracked sessions with an &lt;code&gt;Mcp-Session-Id&lt;/code&gt; header. The new revision removes both, so every request is self-contained. Any server instance behind a load balancer can handle any request, without sticky routing or a shared session store.&lt;/p&gt;

&lt;p&gt;Other notable changes include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi Round-Trip Requests (MRTR)&lt;/strong&gt;: a way to gather input mid-call without holding a stream open.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Header-based routing&lt;/strong&gt;: new &lt;code&gt;Mcp-Method&lt;/code&gt; and &lt;code&gt;Mcp-Name&lt;/code&gt; headers let gateways route and meter traffic without parsing request bodies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cacheable list results&lt;/strong&gt;: list and read responses can carry freshness and cache-scope hints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorization hardening&lt;/strong&gt;: closer alignment with production OAuth 2.0 and OpenID Connect deployments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An extensions framework&lt;/strong&gt;: capabilities such as Tasks and MCP Apps can now evolve on their own timeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A formal deprecation policy&lt;/strong&gt;: implementers get clearer guarantees about how long features will be supported.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a breaking change to the wire protocol, so SDKs need to support both the new revision and older peers during the transition.&lt;/p&gt;

&lt;h3&gt;
  
  
  PHP MCP for the world
&lt;/h3&gt;

&lt;p&gt;PHP runs about 70% of websites whose server-side language is known (W3Techs), from custom business applications to WordPress, Drupal, and sites built on frameworks like Laravel and Symfony.&lt;/p&gt;

&lt;p&gt;A stateless protocol also suits how PHP usually runs. In PHP's typical model, each request is handled independently and nothing is shared between requests. Under the older, session-based protocol, that model needed workarounds. Under 2026-07-28, it simply fits.&lt;/p&gt;

&lt;h3&gt;
  
  
  About the Official PHP SDK
&lt;/h3&gt;

&lt;p&gt;The official SDK was announced in September 2025. It was built by the PHP Foundation, Anthropic's MCP team, and the Symfony team, and it consolidated earlier community work, including the PHP-MCP project, into one trusted implementation. The Symfony team leads maintenance, with Kyrian Obikwelu of PHP-MCP as a maintainer. The first release was server-only, and client support was added later.&lt;/p&gt;

&lt;p&gt;The SDK includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A framework-agnostic API:&lt;/strong&gt; it works in any PHP application. Integrations already exist for Symfony, Drupal, API Platform, CakePHP, Nette, and Kirby.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server building blocks:&lt;/strong&gt; you can expose your PHP code and data as tools, resources, resource templates, and prompts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A client SDK:&lt;/strong&gt; your PHP applications can connect to and talk to MCP servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transports:&lt;/strong&gt; STDIO for local servers and Streamable HTTP for remote ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sessions and authorization:&lt;/strong&gt; these cover the older, session-based protocol revisions as well as authorization support for HTTP servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Support for both protocol eras:&lt;/strong&gt; the initialize-handshake revisions and the stateless 2026-07-28 revision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conformance tracking:&lt;/strong&gt; the SDK is tested weekly against the official MCP Conformance Test Framework.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  A Note on Maturity
&lt;/h3&gt;

&lt;p&gt;The SDK is still pre-1.0. The latest release at the time of writing is v0.8.1, and the project describes itself as experimental until its first major release. Its 2026-07-28 conformance scores are measured against alpha versions of the test framework, so they will change as new test scenarios are published. Work on individual parts of the new spec is tracked openly in the repository's issues.&lt;/p&gt;

&lt;p&gt;As with any library, review the defaults before you deploy to production. That includes HTTP settings such as CORS headers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get Started
&lt;/h3&gt;

&lt;p&gt;Install the SDK with Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require mcp/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Documentation is available at &lt;a href="https://php.sdk.modelcontextprotocol.io" rel="noopener noreferrer"&gt;php.sdk.modelcontextprotocol.io&lt;/a&gt;, and the code, examples, and roadmap are in the official repository:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/modelcontextprotocol/php-sdk" rel="noopener noreferrer"&gt;github.com/modelcontextprotocol/php-sdk&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://blog.modelcontextprotocol.io/posts/2025-09-05-php-sdk/" rel="noopener noreferrer"&gt;Announcing the Official PHP SDK for MCP&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/modelcontextprotocol/php-sdk/blob/main/docs/get-started/index.md" rel="noopener noreferrer"&gt;Get started with PHP MCP SDK&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The SDK is still maturing, and the maintainers welcome feedback, bug reports, documentation fixes, and framework integrations. With the 2026-07-28 spec, the protocol now matches how PHP applications already run.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>php</category>
      <category>mcp</category>
      <category>programming</category>
    </item>
    <item>
      <title>PHP</title>
      <dc:creator>exakat, static analysis for PHP</dc:creator>
      <pubDate>Wed, 26 Mar 2025 17:42:50 +0000</pubDate>
      <link>https://dev.to/exakat/php-12jn</link>
      <guid>https://dev.to/exakat/php-12jn</guid>
      <description></description>
      <category>php</category>
    </item>
    <item>
      <title>Features that make PHP go forward</title>
      <dc:creator>exakat, static analysis for PHP</dc:creator>
      <pubDate>Fri, 19 Jan 2024 21:14:20 +0000</pubDate>
      <link>https://dev.to/exakat/features-that-make-php-go-forward-11ol</link>
      <guid>https://dev.to/exakat/features-that-make-php-go-forward-11ol</guid>
      <description>&lt;h1&gt;
  
  
  Features that make PHP go forward
&lt;/h1&gt;

&lt;p&gt;Open source projects often support older PHP versions, and sometimes, really much older. At some point, they take the decision to move on. With the drop of older versions, (relatively) new features can be used to modernize the sources. These features are the ones that make PHP go forward: they are wanted and awaited.&lt;/p&gt;

&lt;p&gt;To detect which PHP features are important enough to trigger the abandonning of arcane PHP versions, we went a wide spanning audit and linted 51 modern PHP projects with PHP 8.0 and 7.4. Then, we checked what syntax error does the code yield with old PHP versions. By using these features, the backward incompatibility with now gone. &lt;/p&gt;

&lt;h2&gt;
  
  
  General compatibility with PHP 7.4 and 8.0
&lt;/h2&gt;

&lt;p&gt;Out of the 51 projects, 18 projects generate no linting error with PHP 7.4; 20 projects generate no linting error with PHP 8.0. This gives 35% of PHP projects are still ensuring backward compabitibility with PHP 7.4; and a little less than 40% are ensuring PHP 8.0 backward compatibility. &lt;/p&gt;

&lt;p&gt;The other projects are all displaying some incompatibility with these versions. It ranges from 1 file to 695 files, or up to 14% of the code base, incompatible with PHP 8.0. &lt;/p&gt;

&lt;h2&gt;
  
  
  Most frequent adopted features for PHP 8.0
&lt;/h2&gt;

&lt;p&gt;Here are the most frequent features that are making the code backward incompatible. The percentage is the number of projects that are displaying a related error, divided by the number of projects that are backward incompatible. For example, an enumeration &lt;code&gt;enum e {}&lt;/code&gt; yield &lt;code&gt;syntax error, unexpected identifier "e"&lt;/code&gt; in PHP 8.0, and not in PHP 8.1. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.types.enumerations.php"&gt;enum&lt;/a&gt;: 45%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.oop5.properties.php"&gt;readonly property&lt;/a&gt;: 35%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/functions.first_class_callable_syntax.php"&gt;first class callable&lt;/a&gt;: 22%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.types.type-system.php"&gt;intersectional type&lt;/a&gt; : 22%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wiki.php.net/rfc/new_in_initializers"&gt;new initializer&lt;/a&gt; : 19%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.oop5.final.php"&gt;final class&lt;/a&gt;: 3%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.oop5.constants.php"&gt;constant visibility&lt;/a&gt;: 3%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The enumerations (PHP 8.1) are the feature that most often breaks backward incompability in modern code: it happens in 45% of the projets. &lt;/p&gt;

&lt;p&gt;Then, readonly properties (PHP 8.1) while readonly classes are not yet visible. Intersectional types (A&amp;amp;B, PHP 8.1) and first class callable (strlen(...), PHP 8.1) are all close, with about 20% of compatibility breaks. &lt;/p&gt;

&lt;p&gt;Last, but not least, are constant visibility and final classes. Final classes are not appearing. &lt;/p&gt;

&lt;h2&gt;
  
  
  Most frequent adopted features for PHP 7.4
&lt;/h2&gt;

&lt;p&gt;When projects reach PHP 8.0, they start using the following features: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion"&gt;promoted properties&lt;/a&gt;: 66%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/functions.arguments.php"&gt;named parameters&lt;/a&gt;: 42%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.exceptions.php"&gt;throw as expression&lt;/a&gt;: 27%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php.net/manual/en/language.types.mixed.php"&gt;mixed type&lt;/a&gt;: 24%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Promoted properties is a clear winner for adoption. It is a reason to drop backward compatibility in 2 cases out of 3. &lt;/p&gt;

&lt;h2&gt;
  
  
  Other omitted errors
&lt;/h2&gt;

&lt;p&gt;There are a lot more incompatibilities between PHP middle versions (&lt;a href="https://exakat.readthedocs.io/en/latest/Reference/Rulesets/CompatibilityPHP81.html#ruleset-compatibilityphp81"&gt;PHP 8.1&lt;/a&gt;, &lt;a href="https://exakat.readthedocs.io/en/latest/Reference/Rulesets/CompatibilityPHP82.html#ruleset-compatibilityphp82"&gt;PHP 8.2&lt;/a&gt;, &lt;a href="https://exakat.readthedocs.io/en/latest/Reference/Rulesets/CompatibilityPHP83.html#ruleset-compatibilityphp83"&gt;PHP 8.3&lt;/a&gt;...) than simply lint. Notably, the linting process stops at the first encountered error, and there may be a lot more errors later. Yet, this audit only counts the first one. &lt;/p&gt;

&lt;p&gt;Also, some incompatibilities are only visible at execution time: they are left out of this analysis. &lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing the features that make PHP go forward
&lt;/h2&gt;

&lt;p&gt;It is interesting to discover which are the PHP features that are awaited, in projects that prevents themselves from using them to preserve PHP backward incompatibilities. &lt;/p&gt;

&lt;p&gt;It is a reverse scenario, compared to the delivery of a new PHP version. When the project decides to move one, these new features are widely available, and usually well understood by coders. This prevents using features because they are new or fashionable. Only the real ones are adopted. &lt;/p&gt;

</description>
      <category>php</category>
      <category>features</category>
      <category>modernisation</category>
    </item>
  </channel>
</rss>
