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

#460 conditionally enable lazy loading for phpredis #481

Closed
wants to merge 6 commits into from

Conversation

rvanlaak
Copy link
Contributor

@rvanlaak rvanlaak commented Dec 11, 2018

Replaces #479

Fixes #460

@B-Galati
Copy link
Collaborator

@rvanlaak Could you target branch 2.1 and fixup/squash your commits.
We should be good to go after that 🎉
Thanks!

sprintf('Lazy loading Redis is not supported on PhpRedis %s. Please update to Phpredis %s or higher.', $phpRedisVersion, $minimumVersionForLazyLoading),
E_USER_WARNING
);
} else {

Choose a reason for hiding this comment

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

There's really no reason for an else here, this is basically saying

else if ($var === true) {
    set(true);
}

which is equivalent to just

set($var);

Copy link
Contributor Author

@rvanlaak rvanlaak Dec 12, 2018

Choose a reason for hiding this comment

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

@B-Galati up to you 👍 I'm neutral in this one

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dkarlovi You mean we could do $phpredisDef->setLazy($supportsLazyServices); instead of the else block right?
If yes it sounds better 👍

Choose a reason for hiding this comment

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

@B-Galati yes.

@rvanlaak rvanlaak changed the base branch from master to 2.1 December 12, 2018 10:39
@rvanlaak rvanlaak changed the base branch from 2.1 to master December 12, 2018 10:39
@B-Galati
Copy link
Collaborator

LGTM
@rvanlaak Could you target branch 2.1 and fixup/squash your commits.

@Nek-
Copy link

Nek- commented Dec 30, 2018

For your information. Using ubuntu 7.2, standard distribution of PHP 7.2 (which will be maintained for like; 10 years haha) and its php-redis package, the issue #460 occurs.

I assume this is a must have.

@rvanlaak
Copy link
Contributor Author

#487 targets 2.1

@B-Galati B-Galati changed the base branch from master to 2.1 January 9, 2019 07:45
@B-Galati B-Galati changed the base branch from 2.1 to master January 9, 2019 07:45
@B-Galati
Copy link
Collaborator

B-Galati commented Jan 9, 2019

Closing in favor of #487
I will be added in master after it is merged

@B-Galati B-Galati closed this Jan 9, 2019
@rvanlaak rvanlaak deleted the fix-lazy branch January 9, 2019 08:49
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.

None yet

4 participants