Download the PHP package endroid/qr-code-bundle without Composer
On this page you can find all versions of the php package endroid/qr-code-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package qr-code-bundle
QR Code Bundle
By endroid
This Symfony bundle lets you generate QR Codes using the endroid/qr-code library. It provides the following features:
- Configure your defaults (like image size, default writer etc.)
- Support for multiple configurations and injection via aliases
- Generate QR codes for defined configurations via URL like /qr-code/
/Hello - Generate QR codes or URLs directly from Twig using dedicated functions
Installation
Use Composer to install the library. Also make sure you have enabled and configured the GD extension if you want to generate images.
Route Configuration
By default the bundle registers a controller that generates QR codes via the URL
/qr-code/{builder}/{data}. If you only use QR codes programmatically or via Twig
and don't need the route, you can disable it. You can also set a custom prefix.
This makes the route available at /my-custom-prefix/{builder}/{data}.
Builder Configuration
The bundle makes use of builders to create QR codes. The default parameters applied by the builder can optionally be overridden via the configuration. And multiple configurations (thus builders) can be defined.
Each entry under builders defines a named builder with its own defaults.
When no builders are configured the bundle registers a single default builder.
Using Named Builders
Each builder is available for injection using its name suffixed with
QrCodeBuilder. For example the custom builder above can be injected as
$customQrCodeBuilder. You can override the configured defaults at build time:
QR Code Response
The bundle also provides a response object to ease rendering of the resulting image by automatically saving to contents and setting the correct content type.
Twig Extension
The bundle provides a Twig extension for generating a QR code URL, path or data URI. You can use the second argument to specify the builder to use.
Please note that some Twig functions need the route to be enabled to function.
Versioning
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.
License
This source code is subject to the MIT license bundled in the file LICENSE.
All versions of qr-code-bundle with dependencies
endroid/qr-code Version ^6.1.0
symfony/framework-bundle Version ^6.4||^7.4||^8.0
symfony/twig-bundle Version ^6.4||^7.4||^8.0