Download the PHP package pbweb/audit-bundle without Composer

On this page you can find all versions of the php package pbweb/audit-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package audit-bundle

PB Web Media Audit Bundle

Provides an easily extendible Symfony Bundle to create an audit log.

Installation

Install the audit-bundle using composer:

Usage

To insert an entry in the audit logger, create an AuditEvent and give it to the AuditLog

You can also create your own events (which we recommend), as long as they implement the AuditEventInterface.

Flow

Events enter the audit logger which will then trigger the following events (in order) with the provided AuditEventInterface event as an argument:

  1. Pbweb\AuditBundle\Event\AppendAuditEvent
  2. The class name of $event
  3. Pbweb\AuditBundle\Event\LogAuditEvent

That way you can hook into generic flow moments or only respond to specific events.

The Audit Bundle uses the Symfony event system so all the normal shenanigans (like listener priorities, stopping propagation, etc) work when handling these events.

Event appenders

Events aren't usually complete by themselves, you probably want to append some data related to the event like the user that triggered it or the ip of the client.

To do this listen to the Pbweb\AuditBundle\Event\AppendAuditEvent event (either through a listener or subscriber). It will receive all AuditEventInterface events that go into the audit log.

Default event appenders

The Audit Bundle comes packaged with a few event appenders that will be loaded by default, see the configuration section below on how to disable that.

If you use these appenders, you need to add symfony/security to your project.

Loggers

Eventually the audit log entries need to go somewhere, either the database, a PSR logger or whatever you can think of.

The Audit Bundle comes packaged with a PSR logger and Doctrine logger (see below).

You can also implement your own logger by listening to the Pbweb\AuditBundle\Event\LogAuditEvent event. It will receive all AuditEventInterface events that go into the audit log.

PSR logger

By default the Audit Bundle loads the PsrLogger, which will use the @logger service to log events to your default log. Look at the configuration section below on how to disable this behaviour.

Doctrine logger

For small(ish) audit logs you could use the database as a data store. The Audit Bundle comes with an AbstractDoctrineLogger. The only thing you need to do is create a service that implements the convertToEntity method and give it the tag kernel.event_subscriber.

Configuration

You can optionally configure the audit bundle in your app/config.yml file

Copyright

© PB Web Media


All versions of audit-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
psr/log Version ^1.0|^2.0|^3.0
symfony/http-kernel Version ^5.4|^6.0
symfony/dependency-injection Version ^5.4|^6.0
symfony/event-dispatcher Version ^5.4|^6.0
symfony/config Version ^5.4|^6.0
symfony/yaml Version ^5.4|^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pbweb/audit-bundle contains the following files

Loading the files please wait ....