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

Projects
None yet
5 participants
@mkoppanen
Copy link
Member

commented Feb 6, 2016

No description provided.

This was referenced Feb 6, 2016

@mkoppanen

This comment has been minimized.

Copy link
Member Author

commented Feb 9, 2016

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

Merge pull request #214 from mkoppanen/php7
Fixes memory errors, broken code, bugs etc

@mkoppanen mkoppanen merged commit a2305d2 into php-memcached-dev:php7 Feb 9, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@xjewer

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2016

@mkoppanen

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2016

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

@xjewer

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2016

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

@mkoppanen

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2016

package.xml has release notes that contain the note

@xjewer

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2016

👌

@fadimko

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2016

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

@fadimko

This comment has been minimized.

Copy link

commented Mar 3, 2016

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

@mkoppanen

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2016

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

@fadimko

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Mar 3, 2016

Thank you

@mkoppanen

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2016

@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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2016

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

@xjewer

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2016

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

#223

@letynsoft

This comment has been minimized.

Copy link

commented May 22, 2017

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

This comment has been minimized.

Copy link
Contributor

commented May 22, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.