cline/qr

Standalone QR code generation and decoding package.

Maintainers

Package info

github.com/faustbrian/qr

pkg:composer/cline/qr

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2.0 2026-03-25 05:24 UTC

This package is auto-updated.

Last update: 2026-03-25 05:25:46 UTC


README

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads

qr

cline/qr is a standalone QR code generation and decoding package. The repository keeps the Cline project skeleton for tooling and maintenance while the implementation and test coverage live directly in this package.

Requirements

Requires PHP 8.4+

Installation

composer require cline/qr

Usage

use Cline\Qr\Builder\Builder;
use Cline\Qr\Writer\PngWriter;

$result = new Builder(
    data: 'Hello world',
)
    ->withWriter(new PngWriter())
    ->build();

file_put_contents('qr.png', $result->getString());

Public immutable value objects also expose additive with* methods when you want to derive a modified copy without going back through the builder:

use Cline\Qr\Color\Color;
use Cline\Qr\QrCode;

$qrCode = (new QrCode('Hello world'))
    ->withSize(512)
    ->withMargin(4)
    ->withForegroundColor(new Color(12, 34, 56));

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.