From 2492f5fa1ee1f4efd5695f9a9f46fbd57d371c5b Mon Sep 17 00:00:00 2001 From: Steve Parks Date: Wed, 26 Aug 2026 16:55:30 +0200 Subject: [PATCH 1/3] Fix: pagination warm failures are reported against the wrong URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pagination pool reuses the main pass's rejection handler: ```php $pool = new Pool($this->client(), $requests, [ 'concurrency' => $this->concurrency(), 'fulfilled' => function (Response $response, $index) use ($urls) { $this->components->twoColumnDetail($this->getRelativeUri($urls->get($index)), '✓ Cached'); }, 'rejected' => [$this, 'outputFailureLine'], ]); ``` but `outputFailureLine()` resolves its URI from the **compiled URI list**: ```php public function outputFailureLine($exception, $index): void { $uri = $this->getRelativeUri($this->uris()->get($index)); ... ``` `$index` here is an index into the *pagination* pool — `0` for the first page being warmed, `1` for the second — not into `uris()`. So a failed paginated request is reported under whatever unrelated URL happens to sit at that offset in the main list. The `fulfilled` handler two lines above gets this right, which is what makes the asymmetry look unintentional. Two consequences: - The output names a URL that did not fail, and stays silent about the one that did. That is the exact output someone reads when working out why pagination is not caching, so it actively misleads during the investigation it exists for. - When the pagination pool has more entries than the compiled list has left at that offset, `uris()->get($index)` returns `null` and `getRelativeUri(string $uri)` is called with it — a deprecation on PHP 8.1+, fatal under stricter settings. ### The fix — two edits **1. Let the failure line be produced for a given URL**, by splitting the message formatting out of the index lookup. No behaviour change to the existing method: **2. Point the pagination pool at it**, resolving the index against `$urls` the way `fulfilled` already does. ### Notes - Pure output correctness; nothing about what gets warmed changes. - The status line is the useful part of that message — a paginated page turned away at the edge reports `403 Forbidden` — which is why it is worth keeping the existing formatting rather than falling back to `$exception->getMessage()`. --- src/Console/Commands/StaticWarm.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Console/Commands/StaticWarm.php b/src/Console/Commands/StaticWarm.php index d8b3867aa26..07000903a29 100644 --- a/src/Console/Commands/StaticWarm.php +++ b/src/Console/Commands/StaticWarm.php @@ -140,7 +140,9 @@ private function warmPaginatedPages(string $url, int $currentPage, int $totalPag 'fulfilled' => function (Response $response, $index) use ($urls) { $this->components->twoColumnDetail($this->getRelativeUri($urls->get($index)), '✓ Cached'); }, - 'rejected' => [$this, 'outputFailureLine'], + rejected' => function ($exception, $index) use ($urls) { + $this->outputFailureLineFor($urls->get($index), $exception); + }, ]); $promise = $pool->promise(); @@ -183,7 +185,12 @@ public function outputSuccessLine(Response $response, $index): void public function outputFailureLine($exception, $index): void { - $uri = $this->getRelativeUri($this->uris()->get($index)); + $this->outputFailureLineFor($this->uris()->get($index), $exception); + } + + private function outputFailureLineFor(string $url, $exception): void + { + $uri = $this->getRelativeUri($url); if ($exception instanceof RequestException && $exception->hasResponse()) { $response = $exception->getResponse(); From 723daa4cb0a64b236fb10e48281391343cbbcb7f Mon Sep 17 00:00:00 2001 From: Steve Parks Date: Wed, 26 Aug 2026 17:00:25 +0200 Subject: [PATCH 2/3] Fix syntax error in StaticWarm.php Correcting typo introduced after trying to get indentation right for linting when I submit the PR ! --- src/Console/Commands/StaticWarm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/Commands/StaticWarm.php b/src/Console/Commands/StaticWarm.php index 07000903a29..e94cc676f57 100644 --- a/src/Console/Commands/StaticWarm.php +++ b/src/Console/Commands/StaticWarm.php @@ -140,7 +140,7 @@ private function warmPaginatedPages(string $url, int $currentPage, int $totalPag 'fulfilled' => function (Response $response, $index) use ($urls) { $this->components->twoColumnDetail($this->getRelativeUri($urls->get($index)), '✓ Cached'); }, - rejected' => function ($exception, $index) use ($urls) { + 'rejected' => function ($exception, $index) use ($urls) { $this->outputFailureLineFor($urls->get($index), $exception); }, ]); From 06c5a766b752b0a0d7e7b58e0434a550043b2970 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Wed, 26 Aug 2026 12:51:47 -0400 Subject: [PATCH 3/3] Trigger CI re-run (GitHub Actions was having an outage)