Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- 6379:6379
strategy:
matrix:
version: ['7.3', '8.0', '8.1']
version: ['7.3', '8.0', '8.1', '8.2']
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
7.1.6 (Feb 14, 2023)
- Fixed logging on array conversion.

7.1.5 (Oct 28, 2022)
- Updated phpdocs for `ClientInterface`.

Expand Down
3 changes: 3 additions & 0 deletions src/SplitIO/Component/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public function __construct(LogHandlerInterface $handler = null, $level = LogLev
public function log($level, $message, array $context = array())
{
if ($this->logLevels[$level] <= $this->logLevel) {
if (is_array($message)) {
$message = json_encode($message);
}
$this->handler->write($level, $message);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/SplitIO/Sdk/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Client implements ClientInterface

private $evaluator = null;
private $impressionListener = null;
private $queueMetadata = null;

/**
* Flag to get Impression's labels feature enabled
Expand Down
2 changes: 1 addition & 1 deletion src/SplitIO/TreatmentImpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class TreatmentImpression
public static function log($impressions, QueueMetadataMessage $metadata)
{
try {
Di::getLogger()->debug($impressions);
if (is_null($impressions) || (is_array($impressions) && 0 == count($impressions))) {
Di::getLogger()->debug("no impressions were sent");
return null;
}
$impressionCache = new ImpressionCache();
Expand Down
2 changes: 1 addition & 1 deletion src/SplitIO/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

class Version
{
const CURRENT = '7.1.5';
const CURRENT = '7.1.6';
}
2 changes: 1 addition & 1 deletion tests/Suite/Sdk/SdkReadOnlyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function testException()
->getMock();

// Discard (ignore) first logging statement
$logger->expects($this->exactly(2))
$logger->expects($this->exactly(1))
->method('debug');

$logger->expects($this->exactly(2))
Expand Down