Download the PHP package linkorb/app-event-bundle without Composer

On this page you can find all versions of the php package linkorb/app-event-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 app-event-bundle

linkorb/app-event-bundle

Integrates and provides a handy configuration for linkorb/app-event and its standard scheme for logging Application Events.

Installation

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:

Applications that don't use Symfony Flex

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

Usage

The bundle will automatically inject a special App Event logger into services and controllers which implement AppEventLoggerAwareInterface. There are a few ways to achieve this.

Use AppEventLoggerTrait which provides an implementation of both AppEventLoggerAwareInterface and AppEventLoggerInterface:

If your Controllers extend Symfony's AbstractController you can instead make them extend AppEventLoggingController which does the above for you and also extends Symfony's AbstractController:

Your services can extend AppEventLoggingService to get the same benefit:

Configuration

You need to create a Monolog configuration for each of the environments in which the bundle is enabled (which by default is all of them). Put this in each of the Monolog config files:

In the above config, we instruct Symfony's Monolog Bundle to create an additional Logger service with the name monolog.logger.app_event and to create an instance of Monlog's StreamHandler which will be used by our logger to write to the file at path. The minimum logging level for our logger is set to INFO. This is the minimum you need to do to configure the logger, but there are a few extra things you can configure.

The following configurations can be set independently in each environment, for example you could place the directives in a file named config/packages/prod/linkorb_app_event.yaml. If the bundle has been enabled in every environment then you can configure it simultaneously for all environments in config/packages/linkorb_app_event.yaml.

You can turn off the TokenProcessor which automatically adds information to App events about the authenticated user:

You can turn on the TagProcessor which will add your tags to App events:

Finally there are a few things you can configure that you are unlikely to need.

You can change the name of the logging channel from the default app_event:

Remember to use this channel name instead of app_event in the Monolog config files.

You can also change the name of the logging handler from the default app_events:

Remember to use this handler name instead of app_events in the Monolog config files.

Happy Application Event Logging!


All versions of app-event-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.3
linkorb/app-event Version ^2.0
monolog/monolog Version ^1.24 || ^2
psr/log Version ^1.1
symfony/config Version ^5.4 || ^6.0
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/framework-bundle Version ^5.4 || ^6.0
symfony/http-kernel Version ^5.4 || ^6.0
symfony/monolog-bridge Version ^5.4 || ^6.0
symfony/security-core 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 linkorb/app-event-bundle contains the following files

Loading the files please wait ....