Skip to content

Commit

Permalink
Merge pull request #716 from tienvx/revert-breaking-changes
Browse files Browse the repository at this point in the history
fix: Revert breaking changes to FFI\Client::call and FFI\Client::get
  • Loading branch information
tienvx authored Jan 9, 2025
2 parents 48e8fa3 + 30a72dc commit 8e1fffb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpPact/FFI/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,12 +624,12 @@ private function getEnum(string $name): int
return $value;
}

private function call(string $name, mixed ...$arguments): mixed
public function call(string $name, mixed ...$arguments): mixed
{
return $this->ffi->{$name}(...$arguments);
}

private function get(string $name): mixed
public function get(string $name): mixed
{
return $this->ffi->{$name};
}
Expand Down
14 changes: 14 additions & 0 deletions src/PhpPact/FFI/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,18 @@ public function getLevelFilterWarn(): int;
public function getLevelFilterError(): int;

public function getLevelFilterOff(): int;

/**
* @deprecated 10.1.0 This method is deprecated and will be removed in a future release.
* Please use the more specific methods in this interface instead,
* as they provide clearer intent and stricter type definitions.
*/
public function call(string $name, mixed ...$arguments): mixed;

/**
* @deprecated 10.1.0 This method is deprecated and will be removed in a future release.
* Please use the more specific methods in this interface instead,
* as they provide clearer intent and stricter type definitions.
*/
public function get(string $name): mixed;
}

0 comments on commit 8e1fffb

Please sign in to comment.