Share source map with child processes for process isolation#6495
Merged
sebastianbergmann merged 4 commits into11.5from Feb 7, 2026
Merged
Conversation
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 11.5 #6495 +/- ##
============================================
+ Coverage 95.38% 95.39% +0.01%
- Complexity 7154 7161 +7
============================================
Files 738 738
Lines 21864 21882 +18
============================================
+ Hits 20854 20875 +21
+ Misses 1010 1007 -3 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the map generated in the parent process using
SourceMapper::map()available in child processes to avoid generating the map using expensive filesystem operations more than once.See #6493 for context and motivation.
Two new static methods are added to
SourceMapperto enable serializing/deserializing the source map:saveTo(string $path, Source $source): boolcomputes the source map viamap(), serializes it, and writes it to a file in the system's temporary directoryloadFrom(string $path, Source $source): voidReads a serialized source map from a file and populates the static$filescache, skipping the expensive filesystem operationsThe new static property
SeparateProcessTestRunner::$sourceMapFileis used to cache the temporary file path across invocations (computed once, reused for all child processes). It is managed through the new private methodsourceMapFileForChildProcess().