We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using "redisearch-php" with this code :
<?php require_once 'vendor/autoload.php'; use Ehann\RedisRaw\PhpRedisAdapter; use Ehann\RediSearch\Index; $redis = new PhpRedisAdapter(); $index = new Index($redis); //Connecting to Redis server on localhost try { $redis->connect('127.0.0.1', 6379); echo "Successfull connect to Redis-Server!\n"; } catch (Exception $e) { echo "Error connect to Redis-Server!\n"; } //Create Index if not allready exist try { $index->addTextField('sessionId') ->addTextField('timestamp') ->create(); echo "Index 'logging' created!\n"; } catch (Exception $e) { echo "Error create Index 'logging' !\n"; }'
results in: $ php ./bug.php
Successfull connect to Redis-Server! PHP Fatal error: Uncaught Error: Typed property Ehann\RedisRaw\AbstractRedisRawClient::$logger must not be accessed before initialization in /logging/vendor/ethanhann/redis-raw/src/AbstractRedisRawClient.php:40 Stack trace: #0 /logging/vendor/ethanhann/redis-raw/src/PhpRedisAdapter.php(39): Ehann\RedisRaw\AbstractRedisRawClient->prepareRawCommandArguments('FT.CREATE', Array) #1 /logging/vendor/ethanhann/redisearch-php/src/RediSearchRedisClient.php(109): Ehann\RedisRaw\PhpRedisAdapter->rawCommand('FT.CREATE', Array) #2 /logging/vendor/ethanhann/redisearch-php/src/AbstractRediSearchClientAdapter.php(24): Ehann\RediSearch\RediSearchRedisClient->rawCommand('FT.CREATE', Array) #3 /logging/vendor/ethanhann/redisearch-php/src/Index.php(75): Ehann\RediSearch\AbstractRediSearchClientAdapter->rawCommand('FT.CREATE', Array) #4 /logging/bug.php(23): Ehann\RediSearch\Index->create() #5 {main} thrown in /logging/vendor/ethanhann/redis-raw/src/AbstractRedisRawClient.php on line 40
The text was updated successfully, but these errors were encountered:
The fix like this in File AbstractRedisRawClient.php:
-- protected LoggerInterface $logger; ++private $logger; ++ ++ public function __construct(LoggerInterface $logger = null) ++ { ++ $this->logger = $logger; ++ } works fine.
Sorry, something went wrong.
+1
if I require ethanhann/redis-raw composer installs the version 2.1.0 but in this repository the latest version is 2.0.0 and it hasn't this bug
No branches or pull requests
Using "redisearch-php" with this code :
results in:
$ php ./bug.php
The text was updated successfully, but these errors were encountered: