Endroid/qr-code is a PHP library that simplifies the creation of QR codes. It leverages the bacon/bacon-qr-code library for generating the matrix and khanamiryan/qrcode-detector-decoder for validating generated codes. The library offers flexibility through various writers supporting PNG, WebP, SVG, and EPS formats, and integrates with Symfony via a dedicated bundle.
-
Flexible Writers: Supports multiple image writers including PngWriter, SvgWriter, and WebPWriter, with options for customization like compression level and image quality.
-
Symfony Integration: Provides a dedicated bundle for seamless integration within Symfony applications, enabling configuration and generation via Twig.
-
Extensive Configuration: Offers a wide range of options for customizing QR code appearance, including error correction level, size, margin, logo placement, and more. Allows user-defined writers for fine-grained control.
-
Validation Support: Includes validation capabilities to ensure generated QR codes are readable and contain the intended data.
-
Twig Extensions: Offers Twig extensions for easy QR code generation directly within templates.
-
Core Functionality: Generates QR codes from various data sources, including strings and URLs. Provides options for customizing color, size, and error correction levels.
-
Supported Formats: Generates QR codes in multiple formats including PNG, WebP, SVG, and EPS.
-
Symfony Bundle: Offers a dedicated Symfony bundle for easy integration and configuration within Symfony applications.
-
Customizable Writers: Supports various writers with options for controlling image quality, compression, and XML/SVG output.
-
Readability Control: Provides rounding modes and encoding options to optimize QR code readability and compatibility with scanners.
The project is actively maintained with recent commits and a stable release history. Issues are addressed promptly, and the documentation is comprehensive, including examples for various use cases. There is a noticeable community presence through GitHub stars and forks, indicating active usage and support.
Developers looking for a robust and flexible solution for generating QR codes in PHP will benefit from this library. It's suitable for applications requiring customizable QR codes, integration with Symfony, or support for various output formats. The library simplifies the process of creating scannable QR codes and provides tools for validating their integrity.
