-
Notifications
You must be signed in to change notification settings - Fork 40
Require Redis 4.0 and always delete with UNLINK #108
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
harikt
wants to merge
1
commit into
7.x
Choose a base branch
from
drop-unlink-fallback
base: 7.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: auraphp/Aura.Session
Length of output: 11235
🏁 Script executed:
Repository: auraphp/Aura.Session
Length of output: 3331
🌐 Web query:
official phpredis documentation Redis::unlink introduced version💡 Result:
The Redis::unlink method in the phpredis extension was implemented and merged into the develop branch in January 2018 [1]. While the official documentation and repository README do not explicitly state a specific phpredis version number for its introduction, it was added following user requests for Redis 4.0 support [1]. It became available in releases following the January 2018 merge [1]. It is important to note that the unlink method requires the connected Redis server to be version 4.0.0 or higher [2][3][4]. If the server version meets this requirement, unlink functions similarly to the del method but performs the deletion asynchronously in a non-blocking manner [2][5][4].
Citations:
🌐 Web query:
site:github.com/phpredis/phpredis/releases unlink Redis 4.0 phpredis 4.0.0💡 Result:
The phpredis extension supports the UNLINK command, which is used to delete keys asynchronously in Redis. In phpredis, this functionality is accessed via the unlink method on the Redis client instance. The method typically takes one or more keys as arguments, mirroring the behavior of the Redis UNLINK command. Example usage: $redis = new Redis; $redis->connect('127.0.0.1', 6379); $redis->unlink('key1'); $redis->unlink('key1', 'key2', 'key3'); While specific versions like 4.0.0 are older, the UNLINK command was introduced in Redis 4.0, and phpredis has provided support for this command for many years across its release history. You do not need a specific modern version of phpredis to use it, provided your version is compatible with Redis 4.0+. If you are using a very old version of phpredis and encounter an issue, it is recommended to use the raw method to execute the command directly: $redis->rawCommand('UNLINK', 'key1');
Citations:
🏁 Script executed:
Repository: auraphp/Aura.Session
Length of output: 933
🌐 Web query:
phpredis unlink method added release version Redis.stub.php💡 Result:
The unlink method was added to the phpredis extension in release version 4.0.0 [1][2]. This release, which implemented support for both the UNLINK and SWAPDB commands, was published as stable [1]. Regarding Redis.stub.php, this file is part of the phpredis codebase and includes the definition for the unlink method [3][4]. While stub files are updated to reflect the current state of the extension's API, the unlink method's availability in the library itself is tied to the 4.0.0 release [1].
Citations:
🏁 Script executed:
Repository: auraphp/Aura.Session
Length of output: 878
Document the phpredis 4.0.0 requirement
PhpredisClient::del()callsRedis::unlink(), which requires phpredis 4.0.0 or later. Documentext-redis >= 4.0.0for this adapter, or restore theDELfallback. UpdateCHANGELOG.mdto separate this client requirement from the Redis 4.0 server requirement.📍 Affects 2 files
src/Redis/PhpredisClient.php#L60-L60(this comment)CHANGELOG.md#L5-L5🤖 Prompt for AI Agents
Source: MCP tools