ukko / phpredis-phpdoc Goto Github PK
View Code? Open in Web Editor NEW@phpdoc extension php for IDE autocomplete
Home Page: https://github.com/nicolasff/phpredis
@phpdoc extension php for IDE autocomplete
Home Page: https://github.com/nicolasff/phpredis
Hi,
Simple question, why is the command zInterStore is called zInter ? It bugging me in my code ;)
All set commands require strings for $value argument, but in fact we can pass mixed (arrays etc), because of serializers.
https://github.com/ukko/phpredis-phpdoc/blob/master/src/Redis.php#L222
/**
* Set the string value in argument as value of the key.
*
* @param string $key
* @param string $value
* @param int $timeout [optional] Calling setex() is preferred if you want a timeout.
* @return bool TRUE if the command is successful.
* @link http://redis.io/commands/set
* @example $redis->set('key', 'value');
*/
public function set( $key, $value, $timeout = 0 ) {}
"string $value" should be replaced with "mixed $value". For now I get false-positive "expected string" in inspections.
at the moment IDE [PhpStorm] tells me i should not use $redis->multi()
according to phpdoc the internal tag is the opposite of the api tag - it should hide a function from external usage
using it to hide just documentation you need to use brackets around it
thanks
Currently the RedisCluster
class is not exported via extension. Maybe we can add this at least into the stubs here in the master branch at least.
I compare it with php_redis.h in phpredis.
https://github.com/phpredis/phpredis/blob/ede43864a63db547319a01d14a8b272efd77de01/php_redis.h
and found some methods are missing
https://gist.github.com/doodoori2/55fb79a8251c091486a9e83979e5d712
maybe others?
See https://github.com/phpredis/phpredis/releases/tag/5.3.7
Thanks,
Peter
Hey guys
I have a situation when I want to get keys with a pattern using keys()
method. I believe this method sometimes returns another type rather array.
https://github.com/ukko/phpredis-phpdoc/blob/0d81e3ef83a39227e894bf7b67505c349c4ab21d/src/Redis.php#L2980
public function zAdd($key, $options, $score1, $value1, $score2 = null, $value2 = null, $scoreN = null, $valueN = null)
https://github.com/phpredis/phpredis/blob/48d18fcedab884820250436e7734bd6d154c7d4f/redis.c#L2132
Redis::zAdd(string key, int score, string value)
I use composer to pull all my project dependencies. In "require-dev" section, I have added "ukko/phpredis-phpdoc": "dev-master" and composer pulls this project every time I use it to update dependencies. So, add any version tag to repository last commit and composer will use local cache.
All methods should have @throws tag. Without it IDE shows "Exception is never thrown in correspoding try block".
Now Redis::set uses three parameters: key, value and options.
See https://github.com/phpredis/phpredis#examples-4
Thanks
i have a simple instance of redis client. But i am rpush a data to redis, throws a exception "read error on connection"ใ Is that message is append php extends. What is the reason?
Hi,
I'm having trouble using $redis->incrByFloat on phpStorm.
It doesn't matter whether the key exists or not, the value is not incremented by the chosen amount.
Instead of using:
$redis->incrByFloat($key, $amount);
I am currently using:
$float = (float) $redis->get($key);
$redis->set($key, $float + $amount);
which works fine.
thanks
phpredis/phpredis@95c8aab9#diff-6fb31fe7e4f4b06bbb2522a6dc6bae14
PHP_ME(Redis, sortAsc, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_ME(Redis, sortAscAlpha, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_ME(Redis, sortDesc, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_ME(Redis, sortDescAlpha, arginfo_generic_sort, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
/* Mark all of these aliases deprecated. They aren't actual Redis commands. */
PHP_MALIAS(Redis, delete, del, arginfo_del, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, evaluate, eval, arginfo_eval, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, evaluateSha, evalsha, arginfo_evalsha, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, getKeys, keys, arginfo_keys, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, getMultiple, mget, arginfo_mget, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, lGet, lindex, arginfo_lindex, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, lGetRange, lrange, arginfo_key_start_end, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, lRemove, lrem, arginfo_lrem, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, lSize, lLen, arginfo_key, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, listTrim, ltrim, arginfo_ltrim, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, open, connect, arginfo_connect, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, popen, pconnect, arginfo_pconnect, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, renameKey, rename, arginfo_key_newkey, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, sContains, sismember, arginfo_key_value, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, sGetMembers, sMembers, arginfo_key, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, sRemove, srem, arginfo_key_members, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, sSize, scard, arginfo_key, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, sendEcho, echo, arginfo_echo, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, setTimeout, expire, arginfo_expire, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, substr, getRange, arginfo_key_start_end, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zDelete, zRem, arginfo_key_members, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zDeleteRangeByRank, zRemRangeByRank, arginfo_key_min_max, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zDeleteRangeByScore, zRemRangeByScore, arginfo_key_min_max, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zInter, zinterstore, arginfo_zstore, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zRemove, zRem, arginfo_key_members, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zRemoveRangeByScore, zRemRangeByScore, arginfo_key_min_max, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zReverseRange, zRevRange, arginfo_zrange, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zSize, zCard, arginfo_key, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
PHP_MALIAS(Redis, zUnion, zunionstore, arginfo_zstore, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED)
All methods return self in multi mode, but stubs don't describe this behaviour
https://github.com/phpredis/phpredis#multi-exec-discard
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.