tourze/doctrine-async-bundle

Doctrine Async Bundle

0.0.6 2025-04-07 17:24 UTC

This package is auto-updated.

Last update: 2025-04-07 17:28:01 UTC


README

Latest Version

A Symfony bundle that provides asynchronous database operations for Doctrine DBAL, built on top of Symfony Messenger component.

Features

  • Asynchronous database insert operations
  • Duplicate entry detection and handling
  • Configurable duplicate entry error handling
  • Comprehensive logging for insert operations
  • JSON data type support with automatic encoding

Installation

composer require tourze/doctrine-async-bundle

Quick Start

<?php

use Tourze\DoctrineAsyncBundle\Message\InsertTableMessage;

// Create an insert message
$message = new InsertTableMessage();
$message->setTableName('your_table');
$message->setParams([
    'column1' => 'value1',
    'column2' => ['array', 'will', 'be', 'json_encoded'],
]);
$message->setAllowDuplicate(false); // Set to true to ignore duplicate entry errors

// Dispatch the message using Symfony Messenger
$messageBus->dispatch($message);

Contributing

Please see CONTRIBUTING.md for details.

License

The MIT License (MIT). Please see License File for more information.