8000 Implemented PHPUnit, Comply to PSR4, Allow custom \Redis objects by tudborg · Pull Request #4 · ronnylt/redlock-php · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implemented PHPUnit, Comply to PSR4, Allow custom \Redis objects #4

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Implemented PHPUnit, Comply to PSR4, Allow custom \Redis objects #4

wants to merge 5 commits into from

Conversation

tudborg
Copy link
@tudborg tudborg commented Jan 20, 2015

I did a bunch of commits that i needed for this to run against my system.
You might want to cherry-pick what makes sense.

  • Comply to PSR-4 by putting the RedLock class into a vender namespace RedLock (might break backwards compatibility for people using dev-master to install package.
  • Tagging changes to allow freezing to a specific version in composer. This will prevent stuff from breaking in the future.
  • Adding PHPUnit test cases, and a bash script to start and stop 3 redis-server instances used in testing.
  • Allow user to pass an existing instance of a \Redis object instead of the [$host, $port, $timeout] array. (if user is already dealing with a connection, why open a new one)
  • Since custom \Redis objects can now be passed, the $token used to unlock the lock must be serialized with the \Redis objects serializer. This is important if the user is using something than the default serializer (like igbinary).

@tudborg
Copy link
Author
tudborg commented Feb 12, 2015

Ping @ronnylt

signe referenced this pull request in signe/redlock-php Oct 13, 2015
@signe
Copy link
signe commented Oct 14, 2015

Since @ronnylt has abandoned the project, I've created a new codebase and packagist entry signe/redlock-php which contains this pull request, and more.

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
0