Hey Anton,
Pact-PHP is community supported, but the main author has been very busy for the last couple of years, so it gets occasional maintainence.
Looking at your issue, appreciate the snippets you have provided, it might be worth seeing if you can fork the repository and create a test case that demonstrates the issue, to help aid others in their investigations.
You may also be interested in reviewing the PR for the migration to the rust core, as help from the community in reviewing and testing that, would be advantageous as your issue could be caused by the ruby core used in pact-php