PHPackages                             tourze/doctrine-async-insert-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tourze/doctrine-async-insert-bundle

ActiveLibrary

tourze/doctrine-async-insert-bundle
===================================

A Symfony bundle that provides asynchronous database insert operations for Doctrine entities, built on top of Symfony Messenger component for high-performance data insertion.

1.0.3(4mo ago)09.4k20MITPHPCI passing

Since Apr 7Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/doctrine-async-insert-bundle)[ Packagist](https://packagist.org/packages/tourze/doctrine-async-insert-bundle)[ RSS](/packages/tourze-doctrine-async-insert-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (27)Versions (17)Used By (20)

Doctrine Async Insert Bundle
============================

[](#doctrine-async-insert-bundle)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/3dd266979e52c0e4b3f24ee7dbb8ec6e44e79c8c8150c98a9de8a744c2cd173e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f646f637472696e652d6173796e632d696e736572742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-async-insert-bundle)[![PHP Version Require](https://camo.githubusercontent.com/390f90832e41ea334405da4961eb301703ae6d915788e35aa33de5fdb14c2c2d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f646f637472696e652d6173796e632d696e736572742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-async-insert-bundle)[![License](https://camo.githubusercontent.com/8a7f675d7a6335c2f6c168b545e8e95f756088f9e204ddbcf18b0cad2d0b6923/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f646f637472696e652d6173796e632d696e736572742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-async-insert-bundle)[![Total Downloads](https://camo.githubusercontent.com/d2f96640fe7d1d131e2d8e99931ae19e4e2c3ff88c4da682e4a067de0558701d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f646f637472696e652d6173796e632d696e736572742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-async-insert-bundle)[![Code Coverage](https://camo.githubusercontent.com/994d68acb2aadf1c3c7711ddcb3b30429246a6c05da9e601f62c3f932ac795a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/tourze/doctrine-async-insert-bundle)

A Symfony bundle that provides asynchronous database insert operations for Doctrine entities, built on top of Symfony Messenger component for high-performance data insertion.

Features
--------

[](#features)

- 🚀 **Asynchronous database insert operations** - Execute database inserts asynchronously to improve response times
- 🔍 **Duplicate entry detection and handling** - Configurable duplicate entry error handling with logging
- ⏰ **Delayed execution support** - Schedule inserts with configurable delays using Symfony Messenger DelayStamp
- 📝 **Comprehensive logging** - Full logging for all insert operations with detailed error tracking
- 🔧 **Fallback mechanism** - Automatic fallback to synchronous insert when async fails
- 🎯 **Entity-aware** - Direct entity support with automatic SQL generation
- 🔄 **Environment-based control** - Force synchronous mode via environment variable

Installation
------------

[](#installation)

```
composer require tourze/doctrine-async-insert-bundle
```

Quick Start
-----------

[](#quick-start)

### Bundle Registration

[](#bundle-registration)

Add to your `config/bundles.php`:

```
return [
    // ... other bundles
    Tourze\DoctrineAsyncInsertBundle\DoctrineAsyncInsertBundle::class => ['all' => true],
];
```

### Basic Usage

[](#basic-usage)

```
