Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse zend_string macros to make it compile against PHP 7.3-dev #1283
Conversation
|
@fmk thanks! But this change isn't compatible with all previous versions of PHP. |
|
I have tested this with PHP 7.1, 7.2 and 7.3-dev and they all work. What are the errors? |
|
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(¶ms); | |||
|
|
|||
| #if (PHP_MAJOR_VERSION == 7) && (PHP_MINOR_VERSION > 2) | |||
This comment has been minimized.
This comment has been minimized.
remicollet
Dec 15, 2017
Collaborator
IMHO, using PHP_VERSION_ID is simpler (and will take care of PHP 8)
This comment has been minimized.
This comment has been minimized.
yatsukhnenko
Dec 15, 2017
Member
Agree with @remicollet , something like #if (PHP_VERSION_ID < 70300) would be much better
|
@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. |
PHP >=7.3.0 uses zend_string to store `php_url` elements.
|
I've made changes by myself. Thanks! |
PHP >=7.3.0 uses zend_string to store `php_url` elements.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

fmk commentedDec 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.