Sitelet https://github.com/phpredis/phpredis/issues/1448
Skip to content

Removing support for PHP 5 #1448

Description

@michael-grunder

Hey everyone,

PHP 5 is now officially EOL, and we want to remove support for it.

Presently, Phpredis is littered with code in order to support both PHP 5 and PHP 7 in a single branch. Although it does work pretty well for us, it means any improvement or bug-fix has to be tested twice and sometimes has to actually be written twice.

Examples are all over the code, but here's one:

#if (PHP_MAJOR_VERSION < 7)
        zval *z_ret;
        MAKE_STD_ZVAL(z_ret);
#else
        zval zv, *z_ret = &zv;
#endif

It's even worse than this because we're also limited in what features we can use from PHP 7 (e.g. the new argument parsing macros unless we want to duplicate the functionality ourselves.

This is making Phpredis slower, buggier, and and more painful for maintainers and users alike.

We want to remove support for PHP 5 so we can focus on adding features and making Phpredis faster. I've updated and pinned this issue so that hopefully more people will see it and let us know how big an issue it will be for them.

The current plan is to release one more version that supports PHP 5 (probably 4.2.1) and then only support PHP 7 for versions beyond that.

Let us know how painful the removal of PHP 5 will be for you:



Thanks,
Mike

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions