Fix class name for OBJECT command.

Starting with PHP 7.2 "object" is a reserved word and cannot be used as
a name for classes, interfaces or traits.
This commit is contained in:
Daniele Alessandri
2020-08-17 17:54:06 +02:00
parent 33f5a0ec8c
commit 592dd91454
4 changed files with 4 additions and 3 deletions
@@ -18,7 +18,7 @@ use Predis\Command\Command as RedisCommand;
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class OBJECT extends RedisCommand
class OBJECT_ extends RedisCommand
{
/**
* {@inheritdoc}
+1
View File
@@ -26,6 +26,7 @@ class RedisFactory extends Factory
$this->commands = array(
'ECHO' => 'Predis\Command\Redis\ECHO_',
'EVAL' => 'Predis\Command\Redis\EVAL_',
'OBJECT' => 'Predis\Command\Redis\OBJECT_',
);
}
+1 -1
View File
@@ -22,7 +22,7 @@ class OBJECT_Test extends PredisCommandTestCase
*/
protected function getExpectedCommand()
{
return 'Predis\Command\Redis\OBJECT';
return 'Predis\Command\Redis\OBJECT_';
}
/**
+1 -1
View File
@@ -27,7 +27,7 @@ class RedisFactoryTest extends PredisTestCase
$factory = new RedisFactory();
foreach ($this->getExpectedCommands() as $commandID) {
$this->assertTrue($factory->supportsCommand($commandID));
$this->assertTrue($factory->supportsCommand($commandID), "Command factory does not support $commandID");
}
}