Skip to content

Commit

Permalink
fixed depreciation error when using PHP8.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
andykillen committed Jan 14, 2025
1 parent 7c3cda7 commit 6c1e51f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG
the changelog was started from version 1.2.3 onwards.
the changelog was started from version 1.2.3 onwards.

## 1.2.10
* Added $enviroment variable to the ApiEndpointsLoader.php to prevent the Deprecation error on PHP 8.2+

## 1.2.9
* added the a function to purgeServerCache(), which clears all known caches for the envinronment such as the Server and CDN.
Expand Down
2 changes: 1 addition & 1 deletion src/Servebolt/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Client
public function __construct(array $config, bool $storeStatically = true)
{
if (!defined('SB_SDK_VERSION')) {
define('SB_SDK_VERSION', '1.2.4');
define('SB_SDK_VERSION', '1.2.10');
}
$this->initializeConfigHelper($config);
$this->initializeHTTPClient();
Expand Down
6 changes: 6 additions & 0 deletions src/Servebolt/Traits/ApiEndpointsLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
trait ApiEndpointsLoader
{

/**
* @var ConfigHelper
* @since php8.2
*/
private $environment;

private $apiEndpoints = [];

/**
Expand Down

0 comments on commit 6c1e51f

Please sign in to comment.