cline / qr
Standalone QR code generation and decoding package.
Requires
- php: ^8.5.0
- ext-iconv: *
Requires (Dev)
- ext-gd: *
- cline/coding-standard: ^2.0.1
- setasign/fpdf: ^1.8.2
- symfony/var-dumper: ^7.4.0 || ^8.0
README
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.