Skip to content

netbrothers-gmbh/version-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetBrothers Version Bundle

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

About

Trigger based version tables with MariaDB/MySQL and Doctrine

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages