-
-
Notifications
You must be signed in to change notification settings - Fork 3
Continue API improvement #7
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
Conversation
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.
Pull Request Overview
This PR refactors the PostgreSQL advisory lock API to improve consistency and usability. The main focus is on improving method naming, variable naming consistency, and simplifying the API surface.
- Renames variables and parameters for consistency (
postgresLockId
→lockKey
,postgresLockKey
) - Removes the
TransactionLevelLockHandle
class and simplifies transaction-level lock acquisition - Adds a new
withinSessionLevelLock
method for safer session-level lock handling with automatic cleanup
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
test/Unit/Postgres/PostgresLockKeyTest.php | Updates test method and data provider names to use consistent "LockKey" terminology |
test/Integration/Postgres/PostgresAdvisoryLockerTest.php | Updates variable names and adapts tests to new API changes including lock handle property access |
test/Integration/AbstractIntegrationTestCase.php | Renames parameters and improves lock mode matching logic |
src/Postgres/PostgresAdvisoryLocker.php | Major API refactoring: removes handler methods, adds withinSessionLevelLock, simplifies parameter names |
src/Postgres/LockHandle/TransactionLevelLockHandle.php | Removes entire file as part of API simplification |
src/Postgres/LockHandle/SessionLevelLockHandle.php | Updates property name and removes automatic destructor cleanup |
src/Postgres/Enum/PostgresLockWaitModeEnum.php | Reorders documentation comments |
src/Postgres/Enum/PostgresLockLevelEnum.php | Reorders enum cases and documentation |
src/Postgres/Enum/PostgresLockAccessModeEnum.php | Removes string values from enum, simplifying to basic enum cases |
README.md | Updates documentation to reflect API changes and adds new callback-based usage examples |
No description provided.