Releases: Ahed92Wakim/laravel-db-transaction-retry
Releases · Ahed92Wakim/laravel-db-transaction-retry
v2.0.0 – Configurable Deadlock Retrier & Logging Overhaul
Breaking
- Replaced
DBTransactionRetryHelper::transactionWithRetry()with the newMysqlDeadlocks\RetryHelper\Services\DeadlockTransactionRetrier::runWithRetry(). Update imports/usages accordingly. - Package config now lives under
config/mysql-deadlock-retry.php; publish it withphp artisan vendor:publish --tag=mysql-deadlock-retry-configif you rely on defaults.
Highlights
- Added first-class configuration for retry counts, base delay, and log file naming, all overridable via env vars.
- Introduced
DeadlockTransactionRetrierservice with exponential backoff, jitter, request-aware logging context, and container-exposed transaction labels. - Delivered dedicated helpers (
DeadlockLogWriter,TraceFormatter,BindingStringifier) for consistent instrumentation and easier extension. - Updated README with usage samples, configuration guidance, and package badges.
Maintenance
- Switched the test suite to Pest and broadened coverage for retry scenarios, logging behaviour, and jitter math.
- Refreshed GitHub Actions workflow, coding standards config, and development dependencies.
What's Changed
- Add Test, Php-cs-fixer and CI workflows by @ZnarKhalil in #1
- Feature/test pr by @Ahed92Wakim in #2
- extends CI and update README.md by @Ahed92Wakim in #3
- Migrates tests from PHPUnit to Pest by @Ahed92Wakim in #4
- Feature/pest test by @Ahed92Wakim in #5
- Feature/update readme.md by @Ahed92Wakim in #6
- add logo by @Ahed92Wakim in #8
- Feature/file structure by @Ahed92Wakim in #10
New Contributors
- @ZnarKhalil made their first contribution in #1
- @Ahed92Wakim made their first contribution in #2
Full Changelog: 1.3.1...2.0.0
Don't log the none deadlock exception just throw it
Improves DB transaction retry logic do not log if non deadlock exception just throw it
improve logs
1.2.3 improve log
fix log-directory
1.2.1 Merge branch 'hotfix/fix-log'
improve retry logic
Updates dependencies and improves retry logic - Updates composer dependencies to newer versions, including Laravel 12 and PHP 8.2 - Refactors retry logic to include exponential backoff with jitter for more robust handling of deadlocks - Improves logging context with request details (URL, method, token, userId) when available, and includes full exception traces for debugging - Enhance logic to identify retryable deadlock/serialization failure errors