PHPackages                             nowo-tech/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. [Templating &amp; Views](/categories/templating)
4. /
5. nowo-tech/qr-code-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

nowo-tech/qr-code-bundle
========================

Symfony bundle to generate PNG QR codes as data URIs with optional URL safety policy.

v1.2.0(today)042↑2614.3%1MITPHPPHP &gt;=8.1 &lt;8.6CI passing

Since Jul 30Pushed todayCompare

[ Source](https://github.com/nowo-tech/QrCodeBundle)[ Packagist](https://packagist.org/packages/nowo-tech/qr-code-bundle)[ Docs](https://github.com/nowo-tech/QrCodeBundle)[ GitHub Sponsors](https://github.com/HecFranco)[ RSS](/packages/nowo-tech-qr-code-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (22)Versions (4)Used By (1)

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

[](#qr-code-bundle)

[![CI](https://github.com/nowo-tech/QrCodeBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/nowo-tech/QrCodeBundle/actions/workflows/ci.yml) [![Packagist Version](https://camo.githubusercontent.com/d88b9b315a5df7d4f26268b1381fb7f591168af110648317231343048ab922ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f776f2d746563682f71722d636f64652d62756e646c652e7376673f7374796c653d666c6174)](https://packagist.org/packages/nowo-tech/qr-code-bundle) [![Packagist Downloads](https://camo.githubusercontent.com/9c0d02acb88362cd6dbe76e4a6805852c942ec88b0987d851d69f6910068aaa7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f776f2d746563682f71722d636f64652d62756e646c652e737667)](https://packagist.org/packages/nowo-tech/qr-code-bundle) [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE) [![PHP](https://camo.githubusercontent.com/8e58b490725ac49cc8e463c473173681b324c9d92d7854275a785db013ca3de7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f6c6f676f3d706870)](https://php.net) [![Symfony](https://camo.githubusercontent.com/0701ae1a8855b98dea0f1dc9d9025d6b0f9444a803559dc983614d044176348b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d372e34253230253743253230382e30253230253743253230382e312532422d3030303030303f6c6f676f3d73796d666f6e79)](https://symfony.com) [![GitHub stars](https://camo.githubusercontent.com/a50394a670891231a0b5004425db0338c92fa4393817c2562d6cc749698027d9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6e6f776f2d746563682f71722d636f64652d62756e646c652e7376673f7374796c653d736f6369616c266c6162656c3d53746172)](https://github.com/nowo-tech/QrCodeBundle) [![Coverage](https://camo.githubusercontent.com/cd0704b56f1d56def350b6d0164316307bb2f47834225fd85443b6fb0059bc73/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f7665726167652d3130302532352d627269676874677265656e)](#tests-and-coverage)

> ⭐ **Found this useful?** [Install from Packagist](https://packagist.org/packages/nowo-tech/qr-code-bundle) · Give it a **star** on [GitHub](https://github.com/nowo-tech/QrCodeBundle) so more developers can find it.

**Symfony bundle to generate PNG QR codes as data URIs**, with optional URL validation (`http`/`https` only) and host allowlisting.

Used by [WalletQrBundle](https://github.com/nowo-tech/WalletQrBundle) for wallet save-link QRs, and usable standalone in any Symfony app.

[![FrankenPHP Friendly Worker Mode](docs/images/frankenphp-friendly.png)](docs/images/frankenphp-friendly.png)

This bundle is **FrankenPHP worker mode friendly**.

Features
--------

[](#features)

- ✅ PNG QR codes as data URIs (`QrCodeService` / `QrCodeDataUriRenderer`)
- ✅ Named profiles (`default_profile` + `profiles`) for size, ECC, and allowlists
- ✅ Optional Doctrine storage: DB profiles override YAML by name (`use_database_config`)
- ✅ Admin CRUD at `/admin/qr-code-profiles` (when DB storage is enabled)
- ✅ URL safety policy (`QrUrlPolicy`; blocks `javascript:`, `data:`, etc.)
- ✅ Optional host/URL allowlist (exact host or subdomain; path substrings; `#regex`)
- ✅ Typed `QrErrorCorrection` enum (`low` | `medium` | `quartile` | `high`)
- ✅ Twig helpers `qr_code_data_uri` and `qr_code_for_url` (optional profile argument)
- ✅ Twig UX component `` (`symfony/ux-twig-component`)
- ✅ Compatible with Symfony UX Toolkit (optional host dependency, PHP 8.4+)
- ✅ Symfony configuration under `nowo_qr_code`

Quick start
-----------

[](#quick-start)

```
composer require nowo-tech/qr-code-bundle
```

Requires PHP **gd** (or another writer backend supported by `endroid/qr-code`).

```
# config/packages/nowo_qr_code.yaml
nowo_qr_code:
    default_profile: default
    profiles:
        default:
            size: 300
            margin: 10
            error_correction: high
            url_allowlist: []
        compact:
            size: 128
            margin: 2
            error_correction: medium
            url_allowlist:
                - example.com
```

```
use Nowo\QrCodeBundle\Service\QrCodeService;

$dataUri = $qrCodeService->createDataUri('https://example.com');
$safeUri = $qrCodeService->createDataUriForUrl('https://example.com/path', 'compact');
```

```

```

Related
-------

[](#related)

- [WalletQrBundle](https://github.com/nowo-tech/WalletQrBundle) — Google Wallet / Apple Wallet save links + QR (depends on this bundle)

Documentation
-------------

[](#documentation)

- [Installation](docs/INSTALLATION.md)
- [Configuration](docs/CONFIGURATION.md)
- [Usage](docs/USAGE.md)
- [Contributing](docs/CONTRIBUTING.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)
- [Changelog](docs/CHANGELOG.md)
- [Upgrading](docs/UPGRADING.md)
- [Release](docs/RELEASE.md)
- [Security](docs/SECURITY.md)
- [Engram](docs/ENGRAM.md)
- [Spec-driven development](docs/SPEC-DRIVEN-DEVELOPMENT.md)
- [GitHub Spec Kit](docs/SPEC-KIT.md)

### Additional documentation

[](#additional-documentation)

- [GitHub CI](docs/GITHUB_CI.md)

Tests and coverage
------------------

[](#tests-and-coverage)

StackCoverageHow to runPHP**100%** lines (`src/`)`make test-coverage` / `composer test-coverage`TypeScript / JavaScriptN/A (no frontend assets)—PythonN/A—CI enforces PHP coverage at **100%** (Clover elements / line gate via `.scripts/coverage-check-100.php`).

License
-------

[](#license)

MIT © [Nowo.tech](https://nowo.tech)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance100

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7947bfc3f2ce9574a18a2c60f3d95b5d1b0740e65dc929332c92f1df21f75ab?d=identicon)[HecFranco](/maintainers/HecFranco)

---

Top Contributors

[![HecFranco](https://avatars.githubusercontent.com/u/24323276?v=4)](https://github.com/HecFranco "HecFranco (3 commits)")

---

Tags

frankenphpnowophpqr-codesymfonysymfony-bundletwigphpdata-uriqr codeqrsymfonytwigsymfony-uxfrankenphpSymfony Bundletwig-componentux-toolkit

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M405](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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