Skip to content
New issue

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

Fixes memory errors, broken code, bugs etc #214

Merged
merged 1 commit into from
Feb 9, 2016

Conversation

mkoppanen
Copy link
Member

No description provided.

This was referenced Feb 6, 2016
@mkoppanen
Copy link
Member Author

Fixes #199 among other issues.

@mkoppanen mkoppanen closed this Feb 9, 2016
@mkoppanen mkoppanen reopened this Feb 9, 2016
mkoppanen added a commit that referenced this pull request Feb 9, 2016
Fixes memory errors, broken code, bugs etc
@mkoppanen mkoppanen merged commit a2305d2 into php-memcached-dev:php7 Feb 9, 2016
@xjewer
Copy link
Contributor

xjewer commented Mar 3, 2016

@mkoppanen
Copy link
Member Author

@xjewer, cas parameters has been removed (signature change). It was causing issues with inheritance.

@xjewer
Copy link
Contributor

xjewer commented Mar 3, 2016

🙈 i found out cas work only for delayed request now, should to note about it

@mkoppanen
Copy link
Member Author

package.xml has release notes that contain the note

@xjewer
Copy link
Contributor

xjewer commented Mar 3, 2016

👌

@fadimko
Copy link

fadimko commented Mar 3, 2016

@mkoppanen So a user can set Memcached::GET_EXTENDED, so cas_token and user flags will be retrieved inside of a get() call, but the user can't get them?

  • set/get commands do not take cas or user flags parameters.
  • get and getMulti commands take Memcached::GET_EXTENDED flag to retrieve user flags and cas tokens

https://github.com/php-memcached-dev/php-memcached/blob/php7/package.xml#L41

@mkoppanen
Copy link
Member Author

@fadimko there are a ->cas() and ->casMulti() for CAS operations

@fadimko
Copy link

fadimko commented Mar 3, 2016

How can I retrieve them after a get() call?

@mkoppanen
Copy link
Member Author

@fadimko, after a get call? You would retrieve them with Memcached::GET_EXTENDED during a get call

@fadimko
Copy link

fadimko commented Mar 3, 2016

@mkoppanen Oh, now I see. I didn't notice this string:

context.return_value = return_value;

https://github.com/php-memcached-dev/php-memcached/blob/php7/php_memcached.c#L1405

@fadimko
Copy link

fadimko commented Mar 3, 2016

Thank you

@mkoppanen
Copy link
Member Author

@fadimko, yep. It's not ideal from API perspective but it fixes issues with inheriting the class and overriding get (for example PHPUnit seems to do this)

@xjewer
Copy link
Contributor

xjewer commented Mar 3, 2016

what about difference between signature and arginfo?
ZEND_ARG_INFO(0, get_flags) has been missed or omitted?

https://github.com/php-memcached-dev/php-memcached/blob/php7/php_memcached.c#L1394
https://github.com/php-memcached-dev/php-memcached/blob/php7/php_memcached.c#L3719

if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|f!l", &key, &fci, &fcc, &get_flags) == FAILURE) {
    return;
}
ZEND_BEGIN_ARG_INFO_EX(arginfo_get, 0, 0, 1)
    ZEND_ARG_INFO(0, key)
    ZEND_ARG_INFO(0, cache_cb)
ZEND_END_ARG_INFO()

@mkoppanen
Copy link
Member Author

I think missed. Can you open a pr for that?

@xjewer
Copy link
Contributor

xjewer commented Mar 3, 2016

I think missed. Can you open a pr for that?

#223

@letynsoft
Copy link

And what about AT LEAST mentioning it on the PHP manual page? One year later and this is not mentioned anywhere! http://php.net/manual/en/memcached.get.php

@sodabrew
Copy link
Contributor

@letynsoft Editing the manual is a whole separate workflow. Community contributions highly appreciated on this.

Krinkle added a commit to Krinkle/php-memcached that referenced this pull request Aug 18, 2021
This was introduced in 6837d89494,
pull php-memcached-dev#214. I suspect it
may have been a left-over from debugging something. The test was later
changed in 6837d89 to expect the warning in question, although other
similar tests don't encounter such warning currently.

It appears no other Memcached methods emit a PHP Warning when they encounter
a write read or failure. Instead, they typically turn their return value
into boolean false, and provide details via getResultMessage().

The introduction of this warning since php-memcached 3.0 has led to a number
of confused consumers (locally php-memcached-dev#260, php-memcached-dev#409, php-memcached-dev#450, and more reports
within downstream issue trackers).

Closes php-memcached-dev#409.
Krinkle added a commit to Krinkle/php-memcached that referenced this pull request Aug 18, 2021
This was introduced in 6837d89494,
pull php-memcached-dev#214. I suspect it
may have been a left-over from debugging something. The test was later
changed in 6837d89 to expect the warning in question, although other
similar tests don't encounter such warning currently.

It appears no other Memcached methods emit a PHP Warning when they encounter
a write read or failure. Instead, they typically turn their return value
into boolean false, and provide details via getResultMessage().

The introduction of this warning since php-memcached 3.0 has led to a number
of confused consumers (locally php-memcached-dev#260, php-memcached-dev#409, php-memcached-dev#450, and more reports
within downstream issue trackers).

Closes php-memcached-dev#409.
Krinkle added a commit to Krinkle/php-memcached that referenced this pull request Aug 18, 2021
This was introduced in 6837d89494,
pull php-memcached-dev#214. I suspect it
may have been a left-over from debugging something. The test was later
changed in 6837d89 to expect the warning in question, although other
similar tests don't encounter such warning currently.

It appears no other Memcached methods emit a PHP Warning when they encounter
a write read or failure. Instead, they typically turn their return value
into boolean false, and provide details via getResultMessage().

The introduction of this warning since php-memcached 3.0 has led to a number
of confused consumers (locally php-memcached-dev#260, php-memcached-dev#409, php-memcached-dev#450, and more reports
within downstream issue trackers).

Closes php-memcached-dev#409.
Krinkle added a commit to Krinkle/php-memcached that referenced this pull request Aug 18, 2021
This was introduced in php-memcached-dev@6837d89494,
pull php-memcached-dev#214. I suspect it
may have been a left-over from debugging something. The test was later
changed in 6837d89 to expect the warning in question, although other
similar tests don't encounter such warning currently.

It appears no other Memcached methods emit a PHP Warning when they encounter
a write read or failure. Instead, they typically turn their return value
into boolean false, and provide details via getResultMessage().

The introduction of this warning since php-memcached 3.0 has led to a number
of confused consumers (locally php-memcached-dev#260, php-memcached-dev#409, php-memcached-dev#450, and more reports
within downstream issue trackers).

Closes php-memcached-dev#409.
sodabrew pushed a commit that referenced this pull request Aug 23, 2021
This was introduced in 6837d89494,
pull #214. I suspect it
may have been a left-over from debugging something. The test was later
changed in 6837d89 to expect the warning in question, although other
similar tests don't encounter such warning currently.

It appears no other Memcached methods emit a PHP Warning when they encounter
a write read or failure. Instead, they typically turn their return value
into boolean false, and provide details via getResultMessage().

The introduction of this warning since php-memcached 3.0 has led to a number
of confused consumers (locally #260, #409, #450, and more reports
within downstream issue trackers).

Closes #409.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants