Skip to content

fix php8 arginfo #467

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

Merged
merged 1 commit into from
Dec 1, 2020
Merged

Conversation

m6w6
Copy link
Contributor

@m6w6 m6w6 commented Nov 30, 2020

A few fixes for stub/arginfo to match the reality, which makes the test suite complete successfully on PHP-8.0

@sodabrew
Copy link
Contributor

@remicollet Please review as you added the most recent iteration of these stub files.

Copy link
Collaborator

@remicollet remicollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

public function append(string $key, string $value): ?bool {}
public function appendByKey(string $server_key, string $key, string $value): ?bool {}
public function prepend(string $key, string $value): ?bool {}
public function prependByKey(string $server_key, string $key, string $value): ?bool {}
Copy link
Collaborator

@remicollet remicollet Dec 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From php_memc_store_impl these methods return NULL on error (cannot append/prepend with compression turned on) so another way is to raise an exception (PHP 8 only) in such case, as part of the "promote error to exception" global change.

@sodabrew
Copy link
Contributor

sodabrew commented Dec 1, 2020

Thanks! Merging now.

@sodabrew sodabrew merged commit 8f3c5dc into php-memcached-dev:master Dec 1, 2020
@m6w6
Copy link
Contributor Author

m6w6 commented Dec 1, 2020

Awesome, thank you!

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.

3 participants