X Tutup
The Wayback Machine - https://web.archive.org/web/20200912010228/https://github.com/phpredis/phpredis/pull/1283
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

Use zend_string macros to make it compile against PHP 7.3-dev #1283

Closed
wants to merge 6 commits into from

Conversation

@fmk
Copy link

fmk commented Dec 13, 2017

The default branch was showing warnings when compiling with PHP 7.3-dev and the session handler was no working. Adding ZSTR_VAL() and ZSTR_LEN() macros in 3 lines fixed the problems.

@yatsukhnenko
Copy link
Member

yatsukhnenko commented Dec 14, 2017

@fmk thanks! But this change isn't compatible with all previous versions of PHP.

@fmk
Copy link
Author

fmk commented Dec 15, 2017

I have tested this with PHP 7.1, 7.2 and 7.3-dev and they all work. What are the errors?

@fmk
Copy link
Author

fmk commented Dec 15, 2017

I swapped the logic for checking the version. It should now compile with version 5x and 7.x.

@@ -231,7 +231,11 @@ PS_OPEN_FUNC(redis)
if (url->query != NULL) {
array_init(&params);

#if (PHP_MAJOR_VERSION == 7) && (PHP_MINOR_VERSION > 2)

This comment has been minimized.

@remicollet

remicollet Dec 15, 2017

Collaborator

IMHO, using PHP_VERSION_ID is simpler (and will take care of PHP 8)

This comment has been minimized.

@yatsukhnenko

yatsukhnenko Dec 15, 2017

Member

Agree with @remicollet , something like #if (PHP_VERSION_ID < 70300) would be much better

@yatsukhnenko
Copy link
Member

yatsukhnenko commented Dec 19, 2017

@fmk Could you modify your PR to use PHP_VERSION_ID and squash commits? I'm going to merge this and release 3.1.5 as stable on PECL site.

yatsukhnenko added a commit that referenced this pull request Dec 20, 2017
PHP >=7.3.0 uses zend_string to store `php_url` elements.
@yatsukhnenko
Copy link
Member

yatsukhnenko commented Dec 20, 2017

I've made changes by myself. Thanks!

yatsukhnenko added a commit that referenced this pull request Dec 20, 2017
PHP >=7.3.0 uses zend_string to store `php_url` elements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.
X Tutup