Skip to content

Commit

Permalink
Merge pull request #449 from tienvx/update-ffi-library
Browse files Browse the repository at this point in the history
deps: Update ffi library to 0.4.13
  • Loading branch information
tienvx authored Jan 23, 2024
2 parents 61b4f69 + d08322d commit 8d3f617
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions compatibility-suite/tests/Context/V3/Http/ProviderContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public function __construct(
public function aPactFileForInteractionIsToBeVerifiedWithTheFollowingProviderStatesDefined(int $id, TableNode $table): void
{
$this->pactWriter->write($id, $this->pactPath);
$pact = json_decode(file_get_contents($this->pactPath), true);
$pact = json_decode(file_get_contents($this->pactPath));
$rows = $table->getHash();
$pact['interactions'][0]['providerStates'] = array_map(fn (array $row): array => ['name' => $row['State Name'], 'params' => json_decode($row['Parameters'] ?? '{}', true)], $rows);
$pact->interactions[0]->providerStates = array_map(fn (array $row): array => ['name' => $row['State Name'], 'params' => json_decode($row['Parameters'] ?? '{}', true)], $rows);
file_put_contents($this->pactPath, json_encode($pact));
$this->providerVerifier->addSource($this->pactPath);
}
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@
"extra": {
"downloads": {
"pact-ffi-headers": {
"version": "0.4.11",
"version": "0.4.13",
"url": "https://github.com/pact-foundation/pact-reference/releases/download/libpact_ffi-v{$version}/pact.h",
"path": "bin/pact-ffi-headers/pact.h"
},
"pact-ffi-lib": {
"version": "0.4.11",
"version": "0.4.13",
"variables": {
"{$prefix}": "PHP_OS_FAMILY === 'Windows' ? 'pact_ffi' : 'libpact_ffi'",
"{$os}": "PHP_OS === 'Darwin' ? 'osx' : strtolower(PHP_OS_FAMILY)",
Expand Down
12 changes: 6 additions & 6 deletions example/matchers/pacts/matchersConsumer-matchersProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@
]
},
"query": {
"$.pages": {
"locales[]": {
"combine": "AND",
"matchers": [
{
"match": "regex",
"regex": "\\d+"
"regex": "^[a-z]{2}-[A-Z]{2}$"
}
]
},
"$['locales[]']": {
"pages": {
"combine": "AND",
"matchers": [
{
"match": "regex",
"regex": "^[a-z]{2}-[A-Z]{2}$"
"regex": "\\d+"
}
]
}
Expand Down Expand Up @@ -591,9 +591,9 @@
],
"metadata": {
"pactRust": {
"ffi": "0.4.11",
"ffi": "0.4.13",
"mockserver": "1.2.4",
"models": "1.1.12"
"models": "1.1.16"
},
"pactSpecification": {
"version": "4.0"
Expand Down

0 comments on commit 8d3f617

Please sign in to comment.