php-memcached-dev / php-memcached

memcached extension based on libmemcached library
Other
990 stars 323 forks source link

Fix #523 Incorrect PHP reflection type for Memcached::cas $cas_token #524

Closed remicollet closed 2 years ago

remicollet commented 2 years ago

After a bit more thinking, seems better to use proper type hinting

Reflection diff:

@@ -413,7 +413,7 @@
         Method [ <internal:memcached> public method cas ] {

           - Parameters [4] {
-            Parameter #0 [ <required> string $cas_token ]
+            Parameter #0 [ <required> string|int|float $cas_token ]
             Parameter #1 [ <required> string $key ]
             Parameter #2 [ <required> mixed $value ]
             Parameter #3 [ <optional> int $expiration = 0 ]
@@ -424,7 +424,7 @@
         Method [ <internal:memcached> public method casByKey ] {

           - Parameters [5] {
-            Parameter #0 [ <required> string $cas_token ]
+            Parameter #0 [ <required> string|int|float $cas_token ]
             Parameter #1 [ <required> string $server_key ]
             Parameter #2 [ <required> string $key ]
             Parameter #3 [ <required> mixed $value ]
remicollet commented 2 years ago

Squashed and merged