PHPackages                             writtengames/audit-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. writtengames/audit-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

writtengames/audit-bundle
=========================

Symfony 2 bundle for auditing

3.1.x-dev(9y ago)4171[1 issues](https://github.com/WrittenGames/AuditBundle/issues)BSDPHP

Since Aug 17Pushed 6y ago3 watchersCompare

[ Source](https://github.com/WrittenGames/AuditBundle)[ Packagist](https://packagist.org/packages/writtengames/audit-bundle)[ RSS](/packages/writtengames-audit-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

Cisco Systems AuditBundle
=========================

[](#cisco-systems-auditbundle)

[![Build Status](https://camo.githubusercontent.com/2c22436182514f3fbf05e282c40547bd7d7f37737669ee522bdb8ffc3eb0f6c8/68747470733a2f2f7472617669732d63692e6f72672f5772697474656e47616d65732f417564697442756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/WrittenGames/AuditBundle)

Symfony 2 bundle for auditing processes, employees, etc.

Features
--------

[](#features)

This bundle offers the use of form (as in spreadsheet) for a user to audit a process and the management of these forms. Each form is divided in sections and fields and offers four choices of answer possible. Each of the elements can be modified at will through the administration part. (`No user management is included in this bundle`).

In order to help you customize your template, the following twig extensions are available:

### twig functions:

[](#twig-functions)

```
    {{ get_resultforsection() }}        // return the score for the section
    {{ get_weightforsection() }}        // return the weight for the section
    {{ get_resultforaudit() }}          // return the result for the audit
    {{ get_weightforaudit() }}          // return the weight for the audit
```

### twig filters:

[](#twig-filters)

```
    {{ element | archived ( parent ) }} // return the value of archived for the element and its parent element (section/form and field/section)
    {{ element | position ( parent ) }} // return the value of position for the element and its parent element (section/form and field/section)
    {{ form | sections( false|true ) }} // return the sections for the form archived === false | true
    {{ section | fields( false|true ) }}// return the fields for the section archived === false | true
```

Currently the forms are fairly static: Each Section is attached to one and only one Form and each Field is attached to one and only one Section.

The above was correct in the previous iteration of the bundle. Currently, the schema has been changed to allow a Section to be assigned to more than one Form and similarily a Field can be assigned to more than one Section. Which means that the relationship between Form and Section, and between Section and Field are of Many to Many. However, in order to archive Sections, and Fields, the relationship itself has been materialized in a class that holds the property $archived.

**PLEASE NOTE**: the position of Sections on Form and Fields on Section is currently not working as the gedmo extension was to be used, but a change in the schema broke this.

Configuration
-------------

[](#configuration)

If audits are to be saved with a reference to the user having done the auditing the class of the User entity should be configured. Otherwise the user field will be set to NULL.

Likewise, if instead of a text input with the audit reference a dropdown menu with entities should be rendered, the class of the audited entity needs to be configured as well.

Also, a control user can be notified if an audit is considered as containing fatal errors.

Below is a complete example configuration (config.yml):

```
cisco_audit:
    control_user: true
    user:
        class: Acme\UserBundle\Entity\User
        property: id
    audit_reference:
        class: Acme\ServiceBundle\Entity\ServiceCase
        property: caseId
```

Required
--------

[](#required)

For now the following need to be added to the composer.json file of the project:

```
    "repositories": [
        { "type": "vcs", "url": "http://github.com/WrittenGames/AuditBundle" }
    ]

    ...

    "require": {
        "cisco-systems/audit-bundle": "dev-master"
    }
```

Then update through composer.phar

And add the bundle in the AppKernel:

```
    $bundles = array(
        new Craue\TwigExtensionsBundle\CraueTwigExtensionsBundle(),
        new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        new CiscoSystems\AuditBundle\CiscoSystemsAuditBundle(),
    );
```

Add as well the Bundle to the routing.yml:

```
    CiscoSystemsAuditBundle:
        resource: "@CiscoSystemsAuditBundle/Resources/config/routing.yml"
        prefix:   /cisco_audit
```

Finally add the configuration for the stof bundle in the config.yml file:

```
    # Doctrine Extensions
    stof_doctrine_extensions:
        orm:
            default:
                timestampable: true
                sluggable: true
                sortable: true
```

And the orm bundle for the user interface:

```
    doctrine:
        orm:
            resolve_target_entities:
                CiscoSystems\AuditBundle\Model\UserInterface: Acme\UserBundle\Entity\User
                CiscoSystems\AuditBundle\Model\ReferenceInterface: Acme\UserBundle\Entity\Reference
                CiscoSystems\AuditBundle\Model\MetadataInterface: Acme\AuditBundle\Entity\Metadata
```

Once this all done, generate the tables needed:

```
    php app/console doctrine:schema:update --dump-sql
```

Those are:

- audit\_\_audit
- audit\_\_score
- audit\_\_element
- audit\_\_form
- audit\_\_section
- audit\_\_field
- audit\_\_relation
- audit\_\_form\_section
- audit\_\_section\_field

### inheritance and doctrine

[](#inheritance-and-doctrine)

Please note that the class Element is abstract and Form, Section and Field are all children of that class. The same apply to the class Relation and its children: FormSection and SectionField.

Please note as well, that ManyToMany relationship exist between Form and Section, and Section and Field.

### command

[](#command)

if you have saved (somehow) some audit with a totalscore of 0 (zero), you can regenerate those with the following command:

```
    php app/console audit:score:regenerate

```

- Option: 'id' as the audit id to process.
- Option: '--override' to regenerate all the total score and not just the one with value of 0.

TODO
----

[](#todo)

- Allow a section to be assigned to more than one Form
- Allow a Field to be assigned to more than one Section
- Implement functional and unit testing
    - Entity done
    - maybe use \[ICBaseTestBundle\] ()

Issues
------

[](#issues)

Issues should be reported in \[GitHub Issues\] ()

License
-------

[](#license)

This bundle is under the BSD license: The license can be read in \[LICENSE\] ().

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3543d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8572915a586f57ae0fc42f3680613a74c0e81c4e83dc05a73f2f3eeb4d6cd0df?d=identicon)[userfriendly](/maintainers/userfriendly)

---

Top Contributors

[![userfriendly](https://avatars.githubusercontent.com/u/236844?v=4)](https://github.com/userfriendly "userfriendly (44 commits)")[![awolder](https://avatars.githubusercontent.com/u/3007797?v=4)](https://github.com/awolder "awolder (3 commits)")[![mokraftcisco](https://avatars.githubusercontent.com/u/113981572?v=4)](https://github.com/mokraftcisco "mokraftcisco (3 commits)")[![thoroc](https://avatars.githubusercontent.com/u/2297889?v=4)](https://github.com/thoroc "thoroc (1 commits)")

---

Tags

Auditauditingaudits

### Embed Badge

![Health badge](/badges/writtengames-audit-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/writtengames-audit-bundle/health.svg)](https://phpackages.com/packages/writtengames-audit-bundle)
```

###  Alternatives

[tapp/filament-auditing

Filament Laravel Auditing plugin.

113379.4k2](/packages/tapp-filament-auditing)[sylius/taxonomy-bundle

Flexible categorization system for Symfony.

26388.2k7](/packages/sylius-taxonomy-bundle)[sylius/addressing-bundle

Addressing and zone management for Symfony applications.

33221.4k3](/packages/sylius-addressing-bundle)[asinfotrack/yii2-audittrail

Yii2-audittrail is a behavior and a set of widgets to track all modifications performed on a model

1727.0k](/packages/asinfotrack-yii2-audittrail)[motomedialab/simple-laravel-audit

A simple audit helper that integrates directly with Laravel &amp; FilamentPHP

262.7k](/packages/motomedialab-simple-laravel-audit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
