mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
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:
@@ -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}
|
||||
@@ -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_',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class OBJECT_Test extends PredisCommandTestCase
|
||||
*/
|
||||
protected function getExpectedCommand()
|
||||
{
|
||||
return 'Predis\Command\Redis\OBJECT';
|
||||
return 'Predis\Command\Redis\OBJECT_';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user