Skip to content

Commit 0e0b1eb

Browse files
committed
Merge remote-tracking branch 'phpsocialnetwork/master'
2 parents b3263e9 + 231af06 commit 0e0b1eb

File tree

4 files changed

+31
-14
lines changed

4 files changed

+31
-14
lines changed

.github/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 15
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- "[-_-] In Process"
8+
- ">_< Working & Scheduled"
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
17+
closeComment: false

lib/Phpfastcache/Drivers/Couchdb/Driver.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function driverRead(CacheItemInterface $item)
9393
try {
9494
$response = $this->instance->findDocument($item->getEncodedKey());
9595
} catch (CouchDBException $e) {
96-
throw new PhpfastcacheDriverException('Got error while trying to get a document: ' . $e->getMessage(), null, $e);
96+
throw new PhpfastcacheDriverException('Got error while trying to get a document: ' . $e->getMessage(), 0, $e);
9797
}
9898

9999
if ($response->status === 404 || empty($response->body['data'])) {
@@ -124,7 +124,7 @@ protected function driverWrite(CacheItemInterface $item): bool
124124
$this->instance->putDocument(['data' => $this->encode($this->driverPreWrap($item))], $item->getEncodedKey(),
125125
$this->getLatestDocumentRevision($item->getEncodedKey()));
126126
} catch (CouchDBException $e) {
127-
throw new PhpfastcacheDriverException('Got error while trying to upsert a document: ' . $e->getMessage(), null, $e);
127+
throw new PhpfastcacheDriverException('Got error while trying to upsert a document: ' . $e->getMessage(), 0, $e);
128128
}
129129
return true;
130130
}
@@ -147,7 +147,7 @@ protected function driverDelete(CacheItemInterface $item): bool
147147
try {
148148
$this->instance->deleteDocument($item->getEncodedKey(), $this->getLatestDocumentRevision($item->getEncodedKey()));
149149
} catch (CouchDBException $e) {
150-
throw new PhpfastcacheDriverException('Got error while trying to delete a document: ' . $e->getMessage(), null, $e);
150+
throw new PhpfastcacheDriverException('Got error while trying to delete a document: ' . $e->getMessage(), 0, $e);
151151
}
152152
return true;
153153
}
@@ -165,7 +165,7 @@ protected function driverClear(): bool
165165
$this->instance->deleteDatabase($this->getDatabaseName());
166166
$this->createDatabase();
167167
} catch (CouchDBException $e) {
168-
throw new PhpfastcacheDriverException('Got error while trying to delete and recreate the database: ' . $e->getMessage(), null, $e);
168+
throw new PhpfastcacheDriverException('Got error while trying to delete and recreate the database: ' . $e->getMessage(), 0, $e);
169169
}
170170

171171
return true;
@@ -241,4 +241,4 @@ public function getStats(): DriverStatistic
241241
->setData(\implode(', ', \array_keys($this->itemInstances)))
242242
->setInfo('Couchdb version ' . $this->instance->getVersion() . "\n For more information see RawData.");
243243
}
244-
}
244+
}

lib/Phpfastcache/Drivers/Mongodb/Driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected function driverWrite(CacheItemInterface $item): bool
132132
['upsert' => true, 'multiple' => false]
133133
);
134134
} catch (MongoDBException $e) {
135-
throw new PhpfastcacheDriverException('Got an exception while trying to write data to MongoDB server', null, $e);
135+
throw new PhpfastcacheDriverException('Got an exception while trying to write data to MongoDB server', 0, $e);
136136
}
137137

138138
return isset($result['ok']) ? $result['ok'] == 1 : true;

lib/Phpfastcache/Helper/Psr16Adapter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function get($key, $default = null)
6969

7070
return $default;
7171
} catch (PhpfastcacheInvalidArgumentException $e) {
72-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
72+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
7373
}
7474
}
7575

@@ -93,7 +93,7 @@ public function set($key, $value, $ttl = null): bool
9393
}
9494
return $this->internalCacheInstance->save($cacheItem);
9595
} catch (PhpfastcacheInvalidArgumentException $e) {
96-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
96+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
9797
}
9898
}
9999

@@ -107,7 +107,7 @@ public function delete($key): bool
107107
try {
108108
return $this->internalCacheInstance->deleteItem($key);
109109
} catch (PhpfastcacheInvalidArgumentException $e) {
110-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
110+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
111111
}
112112
}
113113

@@ -120,7 +120,7 @@ public function clear(): bool
120120
try {
121121
return $this->internalCacheInstance->clear();
122122
} catch (PhpfastcacheRootException $e) {
123-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
123+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
124124
}
125125
}
126126

@@ -137,7 +137,7 @@ public function getMultiple($keys, $default = null)
137137
return $item->get();
138138
}, $this->internalCacheInstance->getItems($keys));
139139
} catch (PhpfastcacheInvalidArgumentException $e) {
140-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
140+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
141141
}
142142
}
143143

@@ -163,7 +163,7 @@ public function setMultiple($values, $ttl = null): bool
163163
}
164164
return $this->internalCacheInstance->commit();
165165
} catch (PhpfastcacheInvalidArgumentException $e) {
166-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
166+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
167167
}
168168
}
169169

@@ -177,7 +177,7 @@ public function deleteMultiple($keys): bool
177177
try {
178178
return $this->internalCacheInstance->deleteItems($keys);
179179
} catch (PhpfastcacheInvalidArgumentException $e) {
180-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
180+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
181181
}
182182
}
183183

@@ -192,7 +192,7 @@ public function has($key): bool
192192
$cacheItem = $this->internalCacheInstance->getItem($key);
193193
return $cacheItem->isHit() && !$cacheItem->isExpired();
194194
} catch (PhpfastcacheInvalidArgumentException $e) {
195-
throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e);
195+
throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e);
196196
}
197197
}
198198

0 commit comments

Comments
 (0)