Download the PHP package chrisguitarguy/request-id-bundle without Composer

On this page you can find all versions of the php package chrisguitarguy/request-id-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 request-id-bundle

Request ID Bundle

This adds request ID's to your Symfony application. Why? It's a great way to add some additional information to logs and to present to users. For example, if an exception is thrown you'll be able to show the user the request ID which they can pass on to you to locate their specific issue.

Installation

Use Composer.

Then enable the bundle in your AppKernel.

Configuration

How it Works

When a request comes in, it's inspected for the Request-Id header. If present, the value in that header will be used throughout the rest of the bundle. This lets you use request ID's from somewhere higher up in the stack (like in the web server itself).

If no request ID is found, one is generated by the RequestIdGenerator. The default generator creates version 4 UUIDs.

On the way out out, the Request-Id header is set on the response as well using the value described above.

The headers are configurable. See the configuration above.

Monolog Integration

There's a monolog Processor that adds the request ID to extra array on the record. This can be turned off by setting enable_monolog to false in the configuration.

To use the request ID in your logs, include %extra.request_id% in your formatter. Here's a configuration example from this bundle's tests.

Twig Integration

Important: Twig ^2.7 or ^3.0 is required for the twig integration to work.

By default this bundle will add a global request_id function to your twig environment. To disable this set enable_twig to false in the bundle configuration.

Here's an example of a template.

License

MIT. See the LICENSE file.


All versions of request-id-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
symfony/framework-bundle Version ^5.4 || ^6.0 || ^7.0
ramsey/uuid Version ^3.9 || ^4.3
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 chrisguitarguy/request-id-bundle contains the following files

Loading the files please wait ....