Skip to content

Register the kernel route before any test route - #59

Draft
Mir-Zairan wants to merge 3 commits into
playwright-php:mainfrom
Mir-Zairan:fix/kernel-route-first-in-chain
Draft

Mir-Zairan wants to merge 3 commits into
playwright-php:mainfrom
Mir-Zairan:fix/kernel-route-first-in-chain

Conversation

@Mir-Zairan

@Mir-Zairan Mir-Zairan commented Oct 1, 2026 •

Copy link
Copy Markdown

Draft until the fix in playwright-php/playwright#182 is released. That PR makes the newest route answer alone, and fallback() pass the request to the next one.

Under that change, the kernel route hides test routes added before the first visit, because it is registered lazily on that visit. It also sends outside hosts straight to the network with continue(). This registers the kernel route when the client is created, so test routes always run first and can fallback() to it. Outside hosts now go through fallback(), so older routes still see them.

Behaviour change: a test route must call fallback(), not continue(), to reach the kernel. The CHANGELOG says so.

The last commit points CI at the #182 branch. It gets dropped, and the constraint raised, once that release is out.

The kernel route was added on the first visit, so a route a test added
before it never ran, and requests to other hosts went to the network past
context routes. It is now the oldest page route and passes those on with fallback().
…t visit

The changelog now says test routes run before the kernel route and must
fall back to reach it, and the architecture docs explain the route order.
The debug log for external requests names the call it makes.
Temporary: CI needs playwright-php/playwright#182 to run the new route tests. Drop this commit and raise the constraint once that fix is released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant