Skip to content

Fix bug with providing Redis Client #151

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
Jul 23, 2021
Merged

Fix bug with providing Redis Client #151

merged 1 commit into from
Jul 23, 2021

Conversation

CameronHall
Copy link
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

#150

Describe the solution you've provided

Prefixing Redis with a backslash to make it \Redis will resolve the issue, as explained in #150.

Describe alternatives you've considered

N/A

Additional context

I did try writing a test. Unfortunately, it kept failing on PHP 7.0 and 7.1. I stuffed about with it for a little while but I think it's time for bed 🥱

Copy link
Contributor

@eli-darkly eli-darkly left a comment

Choose a reason for hiding this comment

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

Looks good - thanks. We should be able to do a patch release soon.

@eli-darkly
Copy link
Contributor

Also, thanks for trying to write the test - it was almost right. I believe the problem was that when writing test data, you used self::PREFIX . ":$namespace" without accounting for how the SDK also adds its own prefix to Redis keys. The default for that is "launchdarkly" so it would really be self::PREFIX . "launchdarkly:$namespace". We'll add the test before releasing - and we should've had a test for this kind of configuration in the first place.

@eli-darkly eli-darkly merged commit 0b7c1ef into launchdarkly:master Jul 23, 2021
@CameronHall
Copy link
Contributor Author

Thanks for the explanations and prompt action @eli-darkly. Really appreciate it 😄

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.

2 participants