PHPackages                             tiitoo/qr-code-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tiitoo/qr-code-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

tiitoo/qr-code-bundle
=====================

Endroid QR Code Bundle

4.3.1(3y ago)02MITPHPPHP ^8.0

Since Dec 2Pushed 2y agoCompare

[ Source](https://github.com/TiiToo/qr-code-bundle)[ Packagist](https://packagist.org/packages/tiitoo/qr-code-bundle)[ Docs](https://github.com/endroid/qr-code-bundle)[ GitHub Sponsors](https://github.com/endroid)[ RSS](/packages/tiitoo-qr-code-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (39)Used By (0)

QR Code Bundle
==============

[](#qr-code-bundle)

*By [endroid](https://endroid.nl/)*

[![Latest Stable Version](https://camo.githubusercontent.com/503b6886f5ab603c4edd8a21a4e9000d2aa97f762bb3d60020d69b054eeff52f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e64726f69642f71722d636f64652d62756e646c652e737667)](https://packagist.org/packages/endroid/qr-code-bundle)[![Build Status](https://github.com/endroid/qr-code-bundle/workflows/CI/badge.svg)](https://github.com/endroid/qr-code-bundle/actions)[![Total Downloads](https://camo.githubusercontent.com/b0ea606234dbd79fe55b464b2c2234aaa6ba77cad72571f32bcbabb402720a4d/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e64726f69642f71722d636f64652d62756e646c652e737667)](https://packagist.org/packages/endroid/qr-code-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/97a0809b18a844472a53972792e7edca34605d5f0f3d924444b6c01571cf31b5/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f656e64726f69642f71722d636f64652d62756e646c652e737667)](https://packagist.org/packages/endroid/qr-code-bundle)[![License](https://camo.githubusercontent.com/e7969ef2252da722607be667b99f2e092cb8a5552245d3cd5091074436129122/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656e64726f69642f71722d636f64652d62756e646c652e737667)](https://packagist.org/packages/endroid/qr-code-bundle)

This Symfony bundle lets you generate QR Codes using the [endroid/qr-code](https://github.com/endroid/QrCode)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
------------

[](#installation)

Use [Composer](https://getcomposer.org/) to install the library. Also make sure you have enabled and configured the [GD extension](https://www.php.net/manual/en/book.image.php) if you want to generate images.

```
composer require endroid/qr-code-bundle
```

When you use Symfony, the [installer](https://github.com/endroid/installer)makes sure that services are automatically wired. If this is not the case you can find the configuration files in the `.install/symfony` folder.

If you don't want the installer to create the auto-configuration files, it can be disabled as described [here](https://github.com/endroid/installer#configuration).

Configuration
-------------

[](#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.

```
endroid_qr_code:
    default:
        writer: Endroid\QrCode\Writer\PngWriter
        data: 'This is customized QR code'
        # Label is not implemented for SvgWriter
        labelText: 'This is the label'
        labelFontPath: '%kernel.project_dir%/vendor/endroid/qr-code/assets/noto_sans.otf'
        labelFontSize: 20
        labelAlignment: 'center'
    custom:
        writer: Endroid\QrCode\Writer\SvgWriter
        writerOptions:
            exclude_xml_declaration: true # default: false
        data: 'This is customized QR code'
        size: 300
        encoding: 'UTF-8'
        errorCorrectionLevel: 'low' # 'low', 'medium', 'quartile', or 'high'
        roundBlockSizeMode: 'margin'
        logoPath: '%kernel.project_dir%/vendor/endroid/qr-code/tests/assets/symfony.png'
        logoResizeToWidth: 150
        logoPunchoutBackground: true
        validateResult: false
```

Using builders
--------------

[](#using-builders)

Each configuration results in a builder which can be injected in your classes. For instance the custom builder from the example above can be injected like this and you can override the default configuration as follows.

```
use Endroid\QrCode\Builder\BuilderInterface;

public function __construct(BuilderInterface $customQrCodeBuilder)
{
    $result = $customQrCodeBuilder
        ->size(400)
        ->margin(20)
        ->build();
}
```

QR Code Response
----------------

[](#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.

```
use Endroid\QrCodeBundle\Response\QrCodeResponse;

$response = new QrCodeResponse($result);
```

Generate via URL
----------------

[](#generate-via-url)

The bundle provides a controller that allows you to generate QR codes simply by opening an URL like /qr-code/{builder}/{data}. You can configure the prefix in your routing file and pass any of the existing options via query string.

Generate via Twig
-----------------

[](#generate-via-twig)

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.

```

{# You can specify the builder via the second parameter #}

```

Versioning
----------

[](#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
-------

[](#license)

This source code is subject to the MIT license bundled in the file LICENSE.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~51 days

Recently: every ~35 days

Total

38

Last Release

1181d ago

Major Versions

3.x-dev → 4.0.02021-02-28

PHP version history (5 changes)3.0.0PHP &gt;=7.1

3.4.0PHP &gt;=7.2

3.x-devPHP ^7.3||^8.0

4.0.6PHP ^7.4||^8.0

4.2.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4389101?v=4)[TiiToo](/maintainers/TiiToo)[@TiiToo](https://github.com/TiiToo)

---

Top Contributors

[![endroid](https://avatars.githubusercontent.com/u/537253?v=4)](https://github.com/endroid "endroid (139 commits)")[![ThomasLandauer](https://avatars.githubusercontent.com/u/1054469?v=4)](https://github.com/ThomasLandauer "ThomasLandauer (4 commits)")[![epitre](https://avatars.githubusercontent.com/u/1972431?v=4)](https://github.com/epitre "epitre (3 commits)")[![qdequippe](https://avatars.githubusercontent.com/u/3193300?v=4)](https://github.com/qdequippe "qdequippe (3 commits)")[![markwatney2016](https://avatars.githubusercontent.com/u/22563689?v=4)](https://github.com/markwatney2016 "markwatney2016 (1 commits)")[![PhilETaylor](https://avatars.githubusercontent.com/u/400092?v=4)](https://github.com/PhilETaylor "PhilETaylor (1 commits)")[![Saracevas](https://avatars.githubusercontent.com/u/9380319?v=4)](https://github.com/Saracevas "Saracevas (1 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (1 commits)")[![calvera](https://avatars.githubusercontent.com/u/432090?v=4)](https://github.com/calvera "calvera (1 commits)")[![TiiToo](https://avatars.githubusercontent.com/u/4389101?v=4)](https://github.com/TiiToo "TiiToo (1 commits)")[![curry684](https://avatars.githubusercontent.com/u/1455673?v=4)](https://github.com/curry684 "curry684 (1 commits)")[![javiereguiluz](https://avatars.githubusercontent.com/u/73419?v=4)](https://github.com/javiereguiluz "javiereguiluz (1 commits)")[![maks-rafalko](https://avatars.githubusercontent.com/u/3725595?v=4)](https://github.com/maks-rafalko "maks-rafalko (1 commits)")

---

Tags

phpqrsymfonybundlecodeendroid

### Embed Badge

![Health badge](/badges/tiitoo-qr-code-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tiitoo-qr-code-bundle/health.svg)](https://phpackages.com/packages/tiitoo-qr-code-bundle)
```

###  Alternatives

[endroid/qr-code-bundle

Endroid QR Code Bundle

32110.6M17](/packages/endroid-qr-code-bundle)[endroid/qr-code

Endroid QR Code

4.8k67.6M348](/packages/endroid-qr-code)[pentatrion/vite-bundle

Vite integration for your Symfony app

2755.3M13](/packages/pentatrion-vite-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
