mirror of
https://github.com/doctrine/KeyValueStore.git
synced 2026-04-27 02:18:11 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6faf449755 | |||
| 5ecca2e0e2 | |||
| 22af505cac | |||
| 16c1bc3d3d | |||
| 5e6144a852 |
+16
-2
@@ -4,6 +4,10 @@ services:
|
|||||||
- mongodb
|
- mongodb
|
||||||
- redis-server
|
- redis-server
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.composer/cache
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 5.5
|
- 5.5
|
||||||
- 5.6
|
- 5.6
|
||||||
@@ -15,7 +19,17 @@ before_install:
|
|||||||
- composer self-update
|
- composer self-update
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- composer --prefer-source install
|
- composer require satooshi/php-coveralls:~0.6@stable --no-update
|
||||||
|
- composer install --prefer-dist --no-interaction --no-progress
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- vendor/bin/php-cs-fixer -v fix --diff --dry-run
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- vendor/bin/phpunit --verbose
|
- vendor/bin/phpunit --verbose --coverage-text --coverage-clover=coverage.clover
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- if [[ $TRAVIS_PHP_VERSION != "5.6" && $TRAVIS_PULL_REQUEST == "false" ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|||||||
+2
-1
@@ -9,7 +9,8 @@
|
|||||||
"doctrine/couchdb": "^1.0.0-beta4",
|
"doctrine/couchdb": "^1.0.0-beta4",
|
||||||
"phpunit/phpunit": "^4.8|^5.0",
|
"phpunit/phpunit": "^4.8|^5.0",
|
||||||
"aws/aws-sdk-php": "^3.8",
|
"aws/aws-sdk-php": "^3.8",
|
||||||
"riak/riak-client": "dev-master"
|
"riak/riak-client": "dev-master",
|
||||||
|
"friendsofphp/php-cs-fixer": "^1.11"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"aws/aws-sdk-php": "to use the DynamoDB storage",
|
"aws/aws-sdk-php": "to use the DynamoDB storage",
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
namespace Doctrine\KeyValueStore\Storage;
|
namespace Doctrine\KeyValueStore\Storage;
|
||||||
|
|
||||||
use Doctrine\DBAL\Connection;
|
|
||||||
use Doctrine\KeyValueStore\NotFoundException;
|
use Doctrine\KeyValueStore\NotFoundException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,7 +78,7 @@ class ArrayStorage implements Storage
|
|||||||
*/
|
*/
|
||||||
public function update($storageName, $key, array $data)
|
public function update($storageName, $key, array $data)
|
||||||
{
|
{
|
||||||
if (!isset($this->data[$storageName])) {
|
if (! isset($this->data[$storageName])) {
|
||||||
$this->data[$storageName] = [];
|
$this->data[$storageName] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,11 +92,11 @@ class ArrayStorage implements Storage
|
|||||||
*/
|
*/
|
||||||
public function delete($storageName, $key)
|
public function delete($storageName, $key)
|
||||||
{
|
{
|
||||||
if (!isset($this->data[$storageName])) {
|
if (! isset($this->data[$storageName])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->data[$storageName][serialize($key)])) {
|
if (! isset($this->data[$storageName][serialize($key)])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,11 +112,11 @@ class ArrayStorage implements Storage
|
|||||||
*/
|
*/
|
||||||
public function find($storageName, $key)
|
public function find($storageName, $key)
|
||||||
{
|
{
|
||||||
if (!isset($this->data[$storageName])) {
|
if (! isset($this->data[$storageName])) {
|
||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->data[$storageName][serialize($key)])) {
|
if (! isset($this->data[$storageName][serialize($key)])) {
|
||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ class WindowsAzureTableStorage implements Storage, RangeQueryStorage
|
|||||||
$tableNode->appendChild($dom->createTextNode($tableName));
|
$tableNode->appendChild($dom->createTextNode($tableName));
|
||||||
$xml = $dom->saveXML();
|
$xml = $dom->saveXML();
|
||||||
|
|
||||||
$url = $this->baseUrl . '/Tables';
|
$url = $this->baseUrl . '/Tables';
|
||||||
$response = $this->request('POST', $url, $xml, $headers);
|
$response = $this->request('POST', $url, $xml, $headers);
|
||||||
|
|
||||||
if ($response->getStatusCode() != 201) {
|
if ($response->getStatusCode() != 201) {
|
||||||
|
|||||||
Reference in New Issue
Block a user