Uses the database to keep a log of all inserts, updates, and deletes.
Symfony 2.3+
Add the MesdCrudHistoryBundle to your composer.json file. You'll need to add the github url under your "repositories" section, and add the bundle to your "require" section. Make sure not to overwrite any existing repositories or requirements you already have in place:
"repositories": [
{
"type" : "vcs",
"url" : "https://github.com/MESD/CrudHistoryBundle.git"
}
],
"require": {
"mesd/crud-history-bundle": "dev-master"
},Now install the bundle with composer:
$ composer update mesd/crud-history-bundleComposer will install the bundle to your project's vendor/Mesd directory.
Enable the bundle in the kernel:
public function registerBundles()
{
$bundles = [
...
new Mesd\CrudHistoryBundle\MesdCrudHistoryBundle(),
...
];
}$ app/console doctrine:schema:updateStep 3: Specify app_name in parameters.yml (or similar place), either as a refelction of another parameter or raw text
parameters:
app_name: %your_app_name_reference%Step 4: Establish a whitelist for bundles. This will use the bundle name as a default point for determining class name of the acting controller/service/etc when the context is unclear.
config.yml
mesd_crud_history:
bundle_whitelist:
- mesd_siaTurn logging on in config.yml:
config.yml
mesd_crud_history:
log_commands: log