From 149a9baaf7a89f2398307d8855a60d01bcedaebc Mon Sep 17 00:00:00 2001 From: zluiten <1336070+zluiten@users.noreply.github.com> Date: Fri, 19 May 2023 10:53:10 +0200 Subject: [PATCH] rename api version config key to not interfer with http protocol version --- src/Admin/KeycloakClient.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Admin/KeycloakClient.php b/src/Admin/KeycloakClient.php index 9d513ff..6454b3c 100644 --- a/src/Admin/KeycloakClient.php +++ b/src/Admin/KeycloakClient.php @@ -303,10 +303,10 @@ class KeycloakClient extends GuzzleClient public static function factory($config = array()) { $default = array( + 'apiVersion' => '1.0', 'username' => null, 'password' => null, 'realm' => 'master', - 'version' => '1.0', 'baseUri' => null, 'verify' => true, 'token_storage' => new RuntimeTokenStorage(), @@ -315,7 +315,7 @@ public static function factory($config = array()) // Create client configuration $config = self::parseConfig($config, $default); - $file = 'keycloak-' . str_replace('.', '_', $config['version']) . '.php'; + $file = 'keycloak-' . str_replace('.', '_', $config['apiVersion']) . '.php'; $stack = new HandlerStack(); $stack->setHandler(new CurlHandler()); @@ -416,7 +416,7 @@ public function getRealmName() */ public function setVersion($version) { - $this->setConfig('version', $version); + $this->setConfig('apiVersion', $version); } /** @@ -426,7 +426,7 @@ public function setVersion($version) */ public function getVersion() { - return $this->getConfig('version'); + return $this->getConfig('apiVersion'); }