phpstorm.dev

PHP ecosystem insights

PHP knowledge

Versioned PHP knowledge with primary sources and explicit verification dates.

Source checks through 2026-10-27 · 57 sources · This published snapshot is over 48 hours old.

Verified 2026-10-24 Permanent entry

PHP digest — 24 October 2026

A quiet Saturday (UTC). There were no PHP releases, no new security advisories and no RFC status changes. The first three items concern proposals for PHP 8.7, none of them accepted; PHPStan 2.3.2 was added at 16:01 UTC.

Draft RFC: Context Managers v2 with a generator-based using block

Larry Garfield and Arnaud Le Blanc created a Context Managers v2 RFC (version 2.0, Draft, proposed for PHP 8.7) at 22:34 UTC on 23 October. It proposes a semi-reserved using keyword. A Generator acts as the context manager: code before its single yield is setup, and the yielded value becomes the block variable. Exceptions from the block pass through the generator's catch/finally. The using expression evaluates to the generator's return value, and resources are closed automatically. Compared with the first Context Managers RFC (2025, two-method object, still listed as in discussion), v2 trades object typing for generators, which can only be typed as \Generator. Two questions are open: the return value when several managers are combined, and an optional ContextManager interface. There is no discussion thread or implementation yet. An edit at 19:43 UTC on 24 October replaced the template placeholder title, and the official RFC index now lists v2 as a draft. Details: Context Managers v2.

Io\Terminal: author plans fixes before a vote

Replying (132909) to the 23 October review questions, the Io\Terminal author agreed with four of them. They want TerminalException subclasses that tell cancellation, EOF and I/O errors apart, settled before the vote. readSecret()'s fixed 25 ms escape-sequence wait cannot be configured, which they call a limitation worth addressing. getSize() can hide a pending resize, and a zero timeout returns Escape even when the whole sequence is already buffered. Both of those need a fix. These findings came from reading the code. At 17:12 UTC on 24 October the author reported fixes with regression tests on PR #23941: zero-timeout reads now decode an already-available sequence, getSize() keeps a pending resize notification, and readKey() now throws TerminalException at EOF after incomplete UTF-8 instead of returning null repeatedly. The exception subclasses and the readSecret() wait were not mentioned. The RFC page is unchanged (v0.4, under discussion, no vote date). Details: Io\Terminal.

array_partition(): $mode parameter dropped before the RFC

The karma-request thread for an array_partition() RFC drew its first feedback. One reply supported the function but asked for an unlimited number of groups keyed by the callback's return value. The proposer kept the two-way split, [$matching, $nonMatching] with keys preserved, as in Ruby, Kotlin, Rust and Laravel's Collection::partition(), and pointed to the dormant 2023 array_group() draft RFC for grouping. After review on php-src PR #24568, the $mode argument is gone. The callback now always receives ($value, $key), like array_find(), so the signature is array_partition(array $array, callable $callback): array. A second supporter (132911) asked instead for results keyed true/false and for the callback parameter to be named $predicate. The proposer declined both (132914, 13:18 UTC). Boolean array keys are cast to integers, so a true/false keyed result would put the rejected elements at index 0 and swap plain [$matching, $rest] destructuring. They also keep $callback because array_filter(), array_find(), array_any() and array_all() use that name. They plan to document both points in the RFC. The PR description links the RFC page, but that page did not exist (HTTP 404) when checked at about 04:10 and 16:05 UTC. No RFC has been published yet.

PHPStan 2.3.2

PHPStan 2.3.2 was published at 11:37 UTC. For PHP 8.6 code, its notes add ARRAY_FILTER_USE_VALUE as an array_filter() mode with result narrowing, a return type extension for clamp() and the size_delivered key in curl_getinfo() return types. It also reads PHP 8.6 thread-safe globals through exported offsets. Function parameters prefixed with _ are no longer reported as unused. phpstan.phar now says when it runs without the Turbo extension, and PHPStan now restarts its process when the pcov or tideways extension is loaded. In bleeding edge only, BackedEnum::from()/tryFrom() parameter types follow the enum's backing type. The rest are type-inference bug fixes and performance work, including on large array literals. Details: PHPStan 2.3.x.

Coverage

At 04:01 UTC fetch --due collected all 32 due feed, release and index sources without failures. The 25 daily package, adoption, support-window and advisory sources were not due; their data is from 22:01 UTC on 23 October. health --fail-stale reports 57 sources ok and none stale. New records since 22:01 UTC: the Context Managers v2 page creation, the Io\Terminal reply and the array_partition() thread messages (132908, 132910). The official RFC index (952 entries) had no status changes. Two RFCs are voting, with counts unchanged at about 04:05 UTC: number-base exceptions 23–1–0 (closes 1 November 15:30 UTC) and Filter enums 2–10–0 (closes 4 November). Daily package and version observations were not due.

Update at 10:01 UTC: all due sources were collected again without failures, and 57 sources are healthy. There were no new releases, advisories, RFC page edits or index status changes. The vote counts above were unchanged at about 10:05 UTC. New records: the second array_partition() reply (132911) and an [RFC] thread (132912, reposted as 132913) proposing that scalar extension methods be callable without parentheses ('a,b'->arr as sugar for 'a,b'->arr()). That idea builds on the Scalar Extension Methods RFC, has no wiki page or replies yet and is not covered as a story.

Update at 16:01 UTC: all 32 due sources were collected again without failures, and 57 sources are healthy. There were no new PHP releases, advisories, RFC page edits or index status changes. Vote counts were unchanged at about 16:05 UTC. New records: PHPStan 2.3.2 (above), the array_partition() proposer's reply (132914) and the first reply to the paren-less extension methods idea (132915). That reply was a "strong -1": it called the rule arbitrary, said it closes off syntax and said it is premature while the extension methods RFCs are drafts. The idea is still not covered as a story.

Update at 22:01 UTC: all due feed, release and index sources and the 25 daily package, adoption, support-window and advisory sources were collected without failures, and 57 sources are healthy. There were no new PHP releases or advisories, and support-window records were unchanged. The official index now lists Context Managers v2 (draft), and that page was edited (above). Vote counts were unchanged at about 22:05 UTC. New records: the Io\Terminal fixes (above) and an "[Idea]" thread (132917) arguing that the 21 October CVEs show the need for a formal PHP specification. That thread has no replies and is not covered as a story.