PHPackages                             vladpak1/too-simple-qr - 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. vladpak1/too-simple-qr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vladpak1/too-simple-qr
======================

A wrapper for the chillerlan/php-qrcode library that allows you to generate a variety of QR codes with ease.

1.0.1(2y ago)19[1 issues](https://github.com/vladpak1/TooSimpleQR/issues)MITPHPPHP ^8.0

Since Sep 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/vladpak1/TooSimpleQR)[ Packagist](https://packagist.org/packages/vladpak1/too-simple-qr)[ Docs](https://github.com/vladpak1/too-simple-qr)[ RSS](/packages/vladpak1-too-simple-qr/feed)WikiDiscussions develop Synced 1mo ago

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

 vladpak1\\TooSimpleQR
=======================

[](#----vladpak1toosimpleqr)

**TooSimpleQR** is a wrapper over the wonderful [chillerlan/php-qrcode](https://github.com/chillerlan/php-qrcode), which simplifies QR code generation, paying more attention to customizations and ease of interface.

This small pet project is far from perfect, as I'm still a beginner developer learning the ropes. Please keep in mind my limited experience when using it, and proceed at your own risk.

If you want to generate QR codes in a serious project, it's better to use [chillerlan/php-qrcode](https://github.com/chillerlan/php-qrcode).

Examples of QR codes created with this library:

[![](https://raw.githubusercontent.com/vladpak1/TooSimpleQR/develop/assets/examples/presets.png)](https://raw.githubusercontent.com/vladpak1/TooSimpleQR/develop/assets/examples/presets.png)

Requirements
------------

[](#requirements)

- PHP 8.0+
- Composer
- GD or Imagick

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

[](#installation)

```
{
  "require": {
    "vladpak1/too-simple-qr": "*"
  },
  "minimum-stability": "dev",
  "prefer-stable": true
}
```

There are plans to move to a stable version, so soon this will not be necessary.

Or if you already have minimum-stability set to dev, you can simply run:

```
composer require vladpak1/too-simple-qr
```

Usage Example
-------------

[](#usage-example)

```
use vladpak1\TooSimpleQR\QRFactory;
use vladpak1\TooSimpleQR\OutputConstants;
use vladpak1\TooSimpleQR\Image\Logo;

// Load composer
require_once __DIR__ . '/vendor/autoload.php';

$qr = \vladpak1\TooSimpleQR\QRFactory::QRCode();

$settings = \vladpak1\TooSimpleQR\QRFactory::QRSettings();

$logo = new Logo();
$logo->setByPath(Logo::TWITTER_LOGO);

$settings
    ->setOutput(OutputConstants::OUTPUT_PNG)
    ->setSize(500)                              // Size in pixels.
    ->setBackgroundColor('#ffffff')             // Background color in HEX format.
    ->setMargin(50)                             // Margin in pixels.
    ->setFinderColor('#1d9bf0')                 // Finder color in HEX format.
    ->setDataColor('#3284bc')                   // Data color in HEX format.
    ->setCorrectionLevel(OutputConstants::CORRECTION_LEVEL_H) // Correction level.
    ->setCircularModules(true)                  // Round modules.
    ->setCircleRadius(0.75)                     // Circle radius.
    ->setLogo($logo)                            // Logo.
    ->setCustomFinderShape(OutputConstants::SHAPE_CIRCLE); // Custom finder shape.

$qrCodeImage = $qr
    ->setData('Hello World!')
    ->setSettings($settings)
    ->render();

// Now we can save or directly output (as HTML) the QR code.
$qrCodeImage->echo();
```

As a result, we get:

[![](https://raw.githubusercontent.com/vladpak1/TooSimpleQR/develop/assets/examples/example-1.png)](https://raw.githubusercontent.com/vladpak1/TooSimpleQR/develop/assets/examples/example-1.png)

We can also distort the QR code by adding, for example, a gradient:

```
->setBackgroundGradient('#FFD8D8', '#FFF9F9', Gradient::DIRECTION_BOTTOM_TO_TOP);
```

[![](https://raw.githubusercontent.com/vladpak1/TooSimpleQR/develop/assets/examples/example-2.png)](https://raw.githubusercontent.com/vladpak1/TooSimpleQR/develop/assets/examples/example-2.png)

Need to quickly generate a QR code?
-----------------------------------

[](#need-to-quickly-generate-a-qr-code)

Consider using presets — predefined settings for generating QR codes.

You can easily create your own presets by extending the `vladpak1\TooSimpleQR\Preset\AbstractPreset` class.

Example of using a preset:

```
$preset = new \vladpak1\TooSimpleQR\Preset\Presets\InstagramPreset('Hello World!');

// You can also set the driver and output interface for the preset.
$preset
    ->setDriver(\vladpak1\TooSimpleQR\OutputConstants::DRIVER_GD)
    ->setOutput(\vladpak1\TooSimpleQR\OutputConstants::OUTPUT_PNG);

// We get a branded Instagram QR code.
$preset->render()->save('path/to/qr.png');
```

GD or Imagick?
--------------

[](#gd-or-imagick)

This library will work with either GD or Imagick, but some settings are only supported by Imagick. Probably in the future, I will make everything more consistent and the difference in drivers will not be so noticeable. However, at the moment, Imagick is recommended.

The library will automatically select the driver to use, based on what is installed on your server, giving preference to Imagick.

But you can also forcibly specify the driver:

```
$qr->setDriver(OutputConstants::DRIVER_GD);
```

Testing
-------

[](#testing)

TooSimpleQR uses [PHPUnit](https://github.com/sebastianbergmann/phpunit) for testing. Currently, there are very few tests, mainly due to issues with the package architecture.

To run tests, use the following command:

```
composer test
```

License
-------

[](#license)

TooSimpleQR is licensed under the MIT license.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

969d ago

### Community

Maintainers

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

---

Top Contributors

[![vladpak1](https://avatars.githubusercontent.com/u/126534707?v=4)](https://github.com/vladpak1 "vladpak1 (19 commits)")

---

Tags

qr codeqrcodeqrqrcode-generatorqr-generatorqr-code-generatorqr code phpqr-code-generator-php

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/vladpak1-too-simple-qr/health.svg)

```
[![Health](https://phpackages.com/badges/vladpak1-too-simple-qr/health.svg)](https://phpackages.com/packages/vladpak1-too-simple-qr)
```

###  Alternatives

[chillerlan/php-qrcode

A QR Code generator and reader with a user-friendly API. PHP 8.4+

2.4k28.9M208](/packages/chillerlan-php-qrcode)[endroid/qr-code

Endroid QR Code

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

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)[arcanedev/qr-code

QR Code generator

1231.9k1](/packages/arcanedev-qr-code)[devtical/nova-qrcode-field

Nova QR code field

4560.6k2](/packages/devtical-nova-qrcode-field)[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)
