Skip to content

Commit

Permalink
Remove what remains of Credis (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
tspencer244 authored Nov 10, 2023
1 parent 6ef8c46 commit 2ad6474
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions lib/Resque/Redis.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Wrap Credis to add namespace support and various helper methods.
* Wrap {@see Redis} to add namespace support and various helper methods.
*
* @package Resque/Redis
* @author Chris Boulton <chris@bigcommerce.com>
Expand Down Expand Up @@ -113,7 +113,7 @@ public static function prefix($namespace)
* @param string|array $server A DSN or array
* @param int $database A database number to select. However, if we find a valid database number in the DSN the
* DSN-supplied value will be used instead and this parameter is ignored.
* @param null|\Redis|\RedisCluster $client Optional Credis_Cluster or Credis_Client instance instantiated by you
* @param null|\Redis|\RedisCluster $client Optional {@see RedisCluster} or {@see Redis} instantiated by you
*/
public function __construct($server, $database = null, $client = null)
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Resque/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false)
// is redis still alive?
try {
if (Resque::redis()->ping() === false) {
throw new CredisException('redis ping() failed');
throw new \RedisException('redis ping() failed');
}
} catch (CredisException $e) {
} catch (\RedisException $e) {
$this->logger->log(Psr\Log\LogLevel::ERROR, 'redis went away. trying to reconnect');
Resque::$redis = null;
usleep($interval * 1000000);
Expand Down
15 changes: 0 additions & 15 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -845,21 +845,11 @@ parameters:
count: 2
path: lib/Resque/Worker.php

-
message: "#^Caught class CredisException not found\\.$#"
count: 1
path: lib/Resque/Worker.php

-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 3
path: lib/Resque/Worker.php

-
message: "#^Instantiated class CredisException not found\\.$#"
count: 1
path: lib/Resque/Worker.php

-
message: "#^Method Resque_Worker\\:\\:__construct\\(\\) has parameter \\$queues with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1085,11 +1075,6 @@ parameters:
count: 1
path: lib/Resque/Worker.php

-
message: "#^Throwing object of an unknown class CredisException\\.$#"
count: 1
path: lib/Resque/Worker.php

-
message: "#^Unsafe access to private property Resque_Worker\\:\\:\\$processPrefix through static\\:\\:\\.$#"
count: 1
Expand Down

0 comments on commit 2ad6474

Please sign in to comment.