netbrothers-gmbh/version-bundle

Trigger based version tables with MariaDB/MySQL and Doctrine

Installs: 3 235

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 2

Open Issues: 0

Type:symfony-bundle

pkg:composer/netbrothers-gmbh/version-bundle

v4.0.0 2026-02-02 11:25 UTC

This package is auto-updated.

Last update: 2026-02-02 11:28:35 UTC


README

Latest Stable Version Total Downloads License Build Status

This hybrid package works as a Symfony bundle or as a standalone PHP package for managing versioned tables in MariaDB and MySQL databases using Doctrine. It automatically creates versioning triggers for your database tables.

Note: This package is designed to work specifically with MariaDB/MySQL. It is not compatible with other database systems like PostgreSQL or SQLite.

Features

  • Creates and maintains _version tables for your Doctrine entities.
  • Automatically generates INSERT and UPDATE triggers.
  • Works as a native Symfony Bundle.
  • Works as a standalone package in any PHP project with a PSR-11 container.
  • Compatible with Symfony 7.4 / 8.x and Doctrine DBAL 4.

Installation

composer require netbrothers-gmbh/version-bundle

Quick Start (Symfony Bundle)

  1. Add a version column to your entity using the provided trait.
  2. Run the command to generate version tables and triggers:
    php bin/console netbrothers:version

Quick Start (Standalone Package)

  1. Create a container file (e.g., config/container.php) that returns your PSR-11 container with a configured Doctrine EntityManagerInterface.
  2. Run the command and pass the container file path:
    vendor/bin/netbrothers-version --container-file=config/container.php

Documentation

For detailed instructions on installation, configuration, and usage (both for Symfony and standalone mode), please see the full documentation.

License

This bundle is released under the MIT license. See the bundled LICENSE file for details.

Authors

NetBrothers Logo