From 30a72dc4aa6a10ae2df172a46437728e79205747 Mon Sep 17 00:00:00 2001 From: "tien.xuan.vo" Date: Thu, 9 Jan 2025 19:00:57 +0700 Subject: [PATCH] fix: Revert breaking changes to FFI\Client::call and FFI\Client::get --- src/PhpPact/FFI/Client.php | 4 ++-- src/PhpPact/FFI/ClientInterface.php | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/PhpPact/FFI/Client.php b/src/PhpPact/FFI/Client.php index 6a2de3c3..089fdea2 100644 --- a/src/PhpPact/FFI/Client.php +++ b/src/PhpPact/FFI/Client.php @@ -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}; } diff --git a/src/PhpPact/FFI/ClientInterface.php b/src/PhpPact/FFI/ClientInterface.php index 9babb2ac..46c4b9ec 100644 --- a/src/PhpPact/FFI/ClientInterface.php +++ b/src/PhpPact/FFI/ClientInterface.php @@ -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; }