nowo-tech/doctrine-deadlock-retry-bundle
Composer 安装命令:
composer require nowo-tech/doctrine-deadlock-retry-bundle
包简介
Symfony bundle that retries Doctrine flush and custom operations on DBAL deadlock exceptions with configurable profiles.
README 文档
README
⭐ Found this useful? Install from Packagist and give it a star on GitHub.
Symfony bundle that retries EntityManager::flush() and custom operations when Doctrine DBAL raises a deadlock (SQLSTATE[40001], MySQL error 1213).
Features
- DeadlockRetryService:
flush(?string $profile)andretry(callable $operation, ?string $profile). - Named profiles: configure
max_retries,sleep_ms, androllback_on_deadlockper use case. - Default profile: used when no profile name is passed.
- Detects
DeadlockExceptionand related driver errors in the exception chain.
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
- Demo (Symfony 7 & 8) — run
make -C demo up-symfony8from the bundle root. - Demo with FrankenPHP (development and production) — includes FrankenPHP worker mode for production demos.
Quick example
use Nowo\DoctrineDeadlockRetryBundle\Service\DeadlockRetryService; public function __construct( private readonly DeadlockRetryService $deadlockRetry, ) { } public function save(Order $order): void { $this->entityManager->persist($order); $this->deadlockRetry->flush(); $this->deadlockRetry->flush('batch'); }
Requirements
- PHP >= 8.2, < 8.6 (Symfony 8.x requires PHP 8.4+)
- Symfony 6.0+ | 7.4+ | 8.0+ | 8.1+ (minimum tested minors: 7.4, 8.0, 8.1)
- Doctrine ORM and DoctrineBundle
Tests and coverage
- Tests: PHPUnit (PHP)
- PHP: 100%
Version policy
The Composer package is nowo-tech/doctrine-deadlock-retry-bundle. Source and issues: nowo-tech/DoctrineDeadlockRetryBundle.
We follow Semantic Versioning. See Changelog. Security support is described in the Security policy.
License
MIT. See LICENSE.
nowo-tech/doctrine-deadlock-retry-bundle 适用场景与选型建议
nowo-tech/doctrine-deadlock-retry-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 06 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「orm」 「dbal」 「symfony」 「bundle」 「doctrine」 「retry」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nowo-tech/doctrine-deadlock-retry-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nowo-tech/doctrine-deadlock-retry-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nowo-tech/doctrine-deadlock-retry-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Kinikit - PHP Application development framework MVC component
PHP Database ORM for Symfony1. Do NOT use for new projects: please move to a newest Symfony release and Doctrine2
The bundle for easy using json-rpc api on your project
A custom Doctine DBAL type to use PHP DateTime objects set to the system's default timezone.
Bundle Symfony DaplosBundle
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-11