PHPackages                             superextend/qr-code - 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. superextend/qr-code

ActiveLibrary

superextend/qr-code
===================

superextend QR Code

3.7.1(6y ago)08MITPHPPHP &gt;=7.2

Since Dec 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/superextend/qr-code)[ Packagist](https://packagist.org/packages/superextend/qr-code)[ RSS](/packages/superextend-qr-code/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

QR Code
=======

[](#qr-code)

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

[![Latest Stable Version](https://camo.githubusercontent.com/10e6b23b667743473662e47eb09fb5137e08d015f5ecf13964d07816057738ec/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e64726f69642f71722d636f64652e737667)](https://packagist.org/packages/endroid/qr-code)[![Build Status](https://github.com/endroid/qr-code/workflows/CI/badge.svg)](https://github.com/endroid/qr-code/actions)[![Total Downloads](https://camo.githubusercontent.com/5387d9dc0b9b66f5c2979706fe5ca33ac50e9625fb41ac46bc0d22bcfa7920c8/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e64726f69642f71722d636f64652e737667)](https://packagist.org/packages/endroid/qr-code)[![Monthly Downloads](https://camo.githubusercontent.com/029d2d3560d7848ca4368b3b98283dc21d69e05ddfd935dd2490bb0517c777fb/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f656e64726f69642f71722d636f64652e737667)](https://packagist.org/packages/endroid/qr-code)[![License](https://camo.githubusercontent.com/63e8babee0b0722d422d24d28f3a961496da2ec9d0dd7ee29a57282f9dcee283/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656e64726f69642f71722d636f64652e737667)](https://packagist.org/packages/endroid/qr-code)

This library helps you generate QR codes in a jiffy. Makes use of [bacon/bacon-qr-code](https://github.com/Bacon/BaconQrCode)to generate the matrix and [khanamiryan/qrcode-detector-decoder](https://github.com/khanamiryan/php-qrcode-detector-decoder)for validating generated QR codes. Further extended with Twig extensions, generation routes, a factory and a Symfony bundle for easy installation and configuration.

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org/) to install the library.

```
$ composer require superextend/qr-code
```

Basic usage
-----------

[](#basic-usage)

```
use superextend\QrCode\QrCode;

$qrCode = new QrCode('Life is too short to be generating QR codes');

header('Content-Type: '.$qrCode->getContentType());
echo $qrCode->writeString();
```

Advanced usage
--------------

[](#advanced-usage)

```
use superextend\QrCode\ErrorCorrectionLevel;
use superextend\QrCode\LabelAlignment;
use superextend\QrCode\QrCode;
use superextend\QrCode\Response\QrCodeResponse;

// Create a basic QR code
$qrCode = new QrCode('Life is too short to be generating QR codes');
$qrCode->setSize(300);

// Set advanced options
$qrCode->setWriterByName('png');
$qrCode->setMargin(10);
$qrCode->setEncoding('UTF-8');
$qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH());
$qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]);
$qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]);
$qrCode->setLabel('Scan the code', 16, __DIR__.'/../assets/fonts/noto_sans.otf', LabelAlignment::CENTER());
$qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png');
$qrCode->setLogoSize(150, 200);
$qrCode->setRoundBlockSize(true);
$qrCode->setValidateResult(false);
$qrCode->setWriterOptions(['exclude_xml_declaration' => true]);

// Directly output the QR code
header('Content-Type: '.$qrCode->getContentType());
echo $qrCode->writeString();

// Save it to a file
$qrCode->writeFile(__DIR__.'/qrcode.png');

// Create a response object
$response = new QrCodeResponse($qrCode);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

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

2

Last Release

2343d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a45cde82ab0add5155e84036279222dbf873bb3ce4225a18ea031e3b5067530?d=identicon)[superextend](/maintainers/superextend)

---

Top Contributors

[![superextend](https://avatars.githubusercontent.com/u/58968749?v=4)](https://github.com/superextend "superextend (8 commits)")

---

Tags

phpqrcodeqrbundlecodesuperextend

### Embed Badge

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

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

###  Alternatives

[endroid/qr-code

Endroid QR Code

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

Endroid QR Code Bundle

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

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)[tuncaybahadir/quar

A simple QR Code generation tool for your projects with Laravel 10, 11, 12 versions, php 8.2, 8.3, 8.4 and 8.5

6966.5k4](/packages/tuncaybahadir-quar)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

295.1k](/packages/linkxtr-laravel-qrcode)

PHPackages © 2026

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