Daniele Alessandri
f06a41cfdc
Change method to undefine commands in factory.
...
The previous implementation was not good because we were exposing in the
public API an internal implementation detail of the base factory class,
furthermore it made Predis\Command\Factory::define() confusing. Having a
separate method to undefine commands in the factory is self-explanatory.
We also changed `Predis\Configuration\Option\Commands` accordingly when
a dictionary of $commandID => $classCommand is passed to the "commands"
client option and $classCommand is NULL.
A few minor changes (mostly cosmetic or documentation) were applied too.
From feedback to PR #644 .
2020-08-21 14:30:52 +02:00
Daniele Alessandri
c26909699b
Merge remote-tracking branch 'github/pr/639' into main
2020-08-18 16:03:10 +02:00
Daniele Alessandri
592dd91454
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.
2020-08-17 18:32:14 +02:00
Daniele Alessandri
33f5a0ec8c
Merge branch 'stale-master' into main
2020-08-17 17:43:13 +02:00
Raza Mehdi
36a02cf807
Fix test.
2020-08-16 04:31:52 +05:00
Raza Mehdi
5edf443141
Fix tests.
2020-08-16 01:59:41 +05:00
Till Krüss
7636d55e10
rename github org
2020-08-14 10:10:01 -07:00
Till Krüss
f2298dd186
update references to predishq
2020-08-12 11:49:37 -07:00
Till Krüss
597c61a098
fix out of range exception test
2020-08-11 08:43:17 -07:00
Till Krüss
10235d62dc
adjust error message regex
2020-08-10 13:48:17 -07:00
Ali Yousefi
ffcc4bba8c
Fix test error exception for SELECT command
2019-10-06 22:10:17 +03:30
Remi Collet
ce2cbfd929
fix test for ArgumentCountError exception with PHP 7.1
2016-11-17 18:13:12 +01:00
Remi Collet
d1290dfde0
fix test for ArgumentCountError exception with PHP 7.1
2016-11-17 15:24:54 +01:00
Daniele Alessandri
fa643ac20c
Apply CS fixes.
2016-06-10 11:12:26 +02:00
Daniele Alessandri
eb1e686ff9
[tests] Change indentation of mock method expectations.
2016-06-10 11:08:26 +02:00
Daniele Alessandri
f02f3b6d37
[tests] Improve code coverage.
...
There is still some work to improve coverage in other classes though.
2016-06-09 16:41:19 +02:00
Daniele Alessandri
d72a1b5550
Do not extend EVALSHA for ScriptCommand class.
2016-06-09 14:02:22 +02:00
Daniele Alessandri
822f02b8eb
Implement new logic to load command classes.
...
By default Predis now uses a convention-over-configuration approach
by looking for a command class in the Predis\Command\Redis namespace
if it is not already defined in the commands class map.
This change allow us to decrease the time needed to load Predis on
each request since we removed 99% of the mappings in the commands
class map. Classes defined in the internal class map still take the
precedence over this mechanism, so users can still define their own
command classes to handle each command.
2016-06-07 15:23:28 +02:00
Daniele Alessandri
4b47639f9e
Rename command classes using command ID as name.
...
Some notable exceptions are EVAL and ECHO because having these names
as class names would raise a syntax error.
2016-06-04 20:54:41 +02:00
Daniele Alessandri
e4872af747
Modify ctor signature of Predis\Command\RawCommand.
2016-06-04 20:54:36 +02:00
Daniele Alessandri
62b421f20e
Switch from server profiles to commands factory.
...
This change reduces some unnecessary complexity in the library, Redis
commands do not change much after all. Developers can still implement
their own commands factory, inject new commands or override existing
ones. The "profile" client options has been renamed to "commands" and
it accepts instances of Predis\Command\FactoryInterface.
The test suite checks at runtime the version of the running instance
of Redis for integration tests to adapt itself automatically.
2016-06-04 15:36:21 +02:00
Daniele Alessandri
6e3f301588
Move commands classes in Predis\Command\Redis.
2016-06-04 15:36:16 +02:00
Daniele Alessandri
ad7b8b08cb
Run php-cs-fixer.
2016-05-26 09:54:09 +02:00
Daniele Alessandri
0dff761a61
Merge branch 'v1.1-commands-redis-3.2'
2016-05-24 23:17:33 +02:00
Daniele Alessandri
51932d82e8
Add new command: GEORADIUSBYMEMBER (Redis 3.2.0).
2016-05-24 22:35:27 +02:00
Daniele Alessandri
00000fde4e
Add new command: GEORADIUS (Redis 3.2.0).
2016-05-24 22:30:06 +02:00
Daniele Alessandri
b2284d015f
Add new command: GEODIST (Redis 3.2.0).
2016-05-24 17:09:35 +02:00
Daniele Alessandri
c4e0044269
Add new command: GEOPOS (Redis 3.2.0).
2016-05-24 17:09:33 +02:00
Daniele Alessandri
0b6b3b2558
Add new command: GEOHASH (Redis 3.2.0).
2016-05-24 16:00:08 +02:00
Daniele Alessandri
7ef9619f5c
Add new command: GEOADD (Redis 3.2.0).
2016-05-24 16:00:06 +02:00
Daniele Alessandri
3362e474b6
Add new command: BITFIELD (Redis 3.2.0).
2016-05-24 16:00:04 +02:00
Daniele Alessandri
7b3f6e1db5
[tests] Add missing test for key prefix in HSTRLEN.
2016-05-24 15:11:49 +02:00
Daniele Alessandri
1ab65da368
[tests] Missing @requiresRedisVersion for HSTRLEN.
2016-05-24 11:51:04 +02:00
Daniele Alessandri
da009e59dd
[tests] Test count argument for SPOP in Redis 3.2.
2016-05-23 15:53:30 +02:00
Daniele Alessandri
5b3a5bbef9
Run php-cs-fixer.
2016-05-21 15:46:58 +02:00
Daniele Alessandri
104e42cfe0
[tests] Fix test executed on current Redis unstable.
2016-05-10 10:58:46 +02:00
Daniele Alessandri
b6a14cda04
[tests] Fix test executed on current Redis unstable.
2016-05-10 10:51:43 +02:00
Remi Collet
57a7d5d3e6
fix tests, list of allowed commands have changed (redis 3.0.6)
2016-05-08 16:52:05 +02:00
Daniele Alessandri
f43433baf1
Add new command: HSTRLEN (Redis 3.2.0).
...
Also bump the unstable profile version to 3.2.
2015-07-29 11:50:20 +02:00
Daniele Alessandri
6cce9eb35c
Run php-cs-fixer.
2015-07-25 18:37:10 +02:00
Daniele Alessandri
73c9b9d5be
[tests] Fix some tests methods names.
2015-07-25 10:04:27 +02:00
Daniele Alessandri
59798e1f9e
[tests] Apply small changes to commands tests with expirations.
2015-07-25 10:04:24 +02:00
Daniele Alessandri
d0012e67ff
[tests] Cover SET modifiers EX, PX, NX|XX (Redis >= 2.6.12).
2015-07-25 09:10:07 +02:00
Daniele Alessandri
8dd9893a2f
Run php-cs-fixer with new configuration.
2015-07-24 23:17:02 +02:00
Daniele Alessandri
df2e9f4e71
Fix prefix processor to handle variadic EXISTS (Redis >= 3.0.3).
2015-07-24 18:29:51 +02:00
Daniele Alessandri
6590c44a27
Run php-cs-fixer against codebase in src/ and tests/.
2015-07-24 18:04:42 +02:00
Daniele Alessandri
7c1d324f30
[tests] Apply some fixes and improvements and remove old stuff.
2015-07-24 17:26:06 +02:00
Daniele Alessandri
bb6287f22d
[tests] Fix obviously wrong annotation.
2015-07-24 16:20:50 +02:00
Daniele Alessandri
8c76bd6761
Do not parse response to SETNX into boolean value.
2015-07-24 15:52:59 +02:00
Daniele Alessandri
38fafb22ba
Do not parse response to MSETNX into boolean value.
2015-07-24 15:52:53 +02:00