Skip to content

Commit bb36d00

Browse files
authored
Merge pull request #156 from splitio/develop
Develop
2 parents 1a56c48 + 69ff696 commit bb36d00

File tree

11 files changed

+50
-9
lines changed

11 files changed

+50
-9
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ matrix:
1919
services:
2020
- redis-server
2121

22+
before-install:
23+
- echo "extension = zip.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
24+
2225
install:
2326
- composer install --prefer-source --no-interaction
2427
- composer update

CHANGES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
6.2.5 (Apr 27, 2021)
2+
- Added delimiter in SharedMemory Cache.
3+
4+
6.2.4 (Mar 20, 2020)
5+
- Added missing methods in ClientInterface.
6+
17
6.2.3 (Nov 1, 2019)
28
- Added flag `IPAddressesEnabled` into options to enable/disable sending MachineName and MachineIP when data is posted in headers.
39

Detailed-README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ $splitClient = $splitFactory->client();
391391
Within tests folder you can find different test suites in order to run the Split SDK tests. The most important test suite is: **integration** that wrap the others test suites.
392392

393393
### Integration test suite
394-
Before to run this test suite, please be sure to have a Redis instance runing:
394+
Before to run this test suite, please be sure to have a Redis instance running:
395395
- In order to have a local Redis instance you can install [Docker Container Tool](https://www.docker.com) and pull the oficial Redis container running the command ```docker pull redis```.
396396

397397
And set the correct values on the **phpunit.xml** that you should have copied from **phpunit.xml.dist** file.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Split has built and maintains SDKs for:
4949
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
5050
* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
5151
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
52-
* .NET [Github](https://github.com/splitio/.net-core-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
52+
* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
5353
* Ruby [Github](https://github.com/splitio/ruby-client) [Docs](https://help.split.io/hc/en-us/articles/360020673251-Ruby-SDK)
5454
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
5555
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"phpunit/phpunit": "~4.0",
3434
"phpdocumentor/phpdocumentor": "2.*",
3535
"squizlabs/php_codesniffer": "2.*",
36-
"rogervila/php-sonarqube-scanner": "0.4.0"
36+
"rogervila/php-sonarqube-scanner": "1.1.0"
3737
},
3838

3939
"autoload": {

src/SplitIO/Component/Common/ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static function stop($throw = false)
7474
}
7575

7676
/**
77-
* Method to add the catched error
77+
* Method to add the caught error
7878
* @param $errno
7979
* @param string $errstr
8080
* @param string $errfile

src/SplitIO/Component/Memory/SharedMemory.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static function write($key, $value, $expiration = 60, $mode = 0644, $size
3737

3838
$expiration = time() + $expiration;
3939

40-
$data = json_encode(array('expiration' => $expiration, 'value' => serialize($value)));
40+
$data = json_encode(array('expiration' => $expiration, 'value' => serialize($value))) . "\0";
4141

4242
@$shm_id = shmop_open($key, "c", $mode, $size);
4343

@@ -87,7 +87,11 @@ public static function read($key, $mode = 0644, $size = 100)
8787
throw new ReadSharedMemoryException("The shared memory block could not be read");
8888
}
8989

90-
$data = json_decode($cached_string, true);
90+
$null_pos = strpos($cached_string, "\0");
91+
$data = json_decode(
92+
substr($cached_string, 0, $null_pos),
93+
true
94+
);
9195

9296
if ((isset($data['expiration']) && time() > $data['expiration']) || !isset($data['expiration'])) {
9397
shmop_delete($shm_id);

src/SplitIO/Sdk/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private function registerData($impressions, $attributes, $metricName, $latency =
254254
}
255255
} catch (\Exception $e) {
256256
SplitApp::logger()->critical(
257-
': An exception occured when trying to store impressions.'
257+
': An exception occurred when trying to store impressions.'
258258
);
259259
}
260260
}

src/SplitIO/Sdk/Evaluator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private function evalTreatment($key, $bucketingKey, $split, array $attributes =
117117
}
118118
SplitApp::logger()->info("*Treatment for $key in {$split->getName()} is: ".$result['treatment']);
119119
} catch (\Exception $e) {
120-
SplitApp::logger()->critical('An exception occured when evaluating feature: '. $split->getName());
120+
SplitApp::logger()->critical('An exception occurred when evaluating feature: '. $split->getName());
121121
SplitApp::logger()->critical($e->getMessage());
122122
SplitApp::logger()->critical($e->getTraceAsString());
123123
$result['impression']['label'] = ImpressionLabel::EXCEPTION;

src/SplitIO/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
class Version
55
{
6-
const CURRENT = '6.2.4';
6+
const CURRENT = '6.2.5';
77
}

0 commit comments

Comments
 (0)