alcalyn/flush-on-kernel-terminate-bundle

Just add a listener to automatically flush non-flushed entities after the response has been sent.

v0.9.1 2014-09-02 16:13 UTC

This package is not auto-updated.

Last update: 2024-12-17 08:22:00 UTC


README

Just execute EntityManager::flush() on kernel terminate.

If an entity can wait before to be flushed, don't flush it, and let this bundle to flush it after the response has been sent.

Installation

Step 1: Download using composer

{
    "require": {
        "alcalyn/flush-on-kernel-terminate": "1.x"
    }
}

Update your composer.

php composer.phar update

Step 2: Register the Bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Alcalyn\FlushOnKernelTerminateBundle\AlcalynFlushOnKernelTerminateBundle(),
    );
}

License

This bundle is under the MIT license. See the complete license:

Resources/meta/LICENSE