Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 29, 2024 via composer

endroid/qr-code 5.0.3

Endroid QR Code
Package summary
Share
0
issues
2
licenses
2
BSD-2-Clause
1
MIT
Package created
2 Jan 2018
Version published
19 Dec 2023
Maintainers
1
Total deps
3
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
bacon/bacon-qr-code@2.0.8
dasprid/enum@1.0.5

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
endroid/qr-code@5.0.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of endroid/qr-code 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
bacon/bacon-qr-code2.0.893.9 kBBSD-2-Clause
prod

Visualizations

Frequently Asked Questions

What does endroid/qr-code do?

Endroid/qr-code is a popular PHP library aimed at generating QR (Quick Response) codes instantly. It leverages the power of bacon/bacon-qr-code to generate the matrix and khanamiryan/qrcode-detector-decoder to validate generated QR codes. This library also offers Twig extensions, generation routes, a factory, and a Symfony bundle for easy installation and configuration. What's more, it provides different writers to generate the QR code as PNG, SVG, EPS, or in binary format.

How do you use endroid/qr-code?

To use Endroid/qr-code, firstly, ensure that you have installed it via Composer and that you have enabled and configured the GD extension if images are being generated. The installation command is composer require endroid/qr-code. After installation, you can generate QR codes using the builder provided by the library. Here is a sample snippet:

<?php
use Endroid\QrCode\Builder\Builder;
use Endroid\QrCode\Encoding\Encoding;
use Endroid\QrCode\Label\LabelAlignment;
use Endroid\QrCode\Label\Font\NotoSans;
use Endroid\QrCode\RoundBlockSizeMode;
use Endroid\QrCode\Writer\PngWriter;

$result = Builder::create()
    ->writer(new PngWriter())
        ...
    ->data('QR Code Content')
        ...
    ->build();
?>

The generated QR code can be output directly, saved to a file or used in an <img> tag via a data URI as shown below:

<?php
...
header('Content-Type: '.$result->getMimeType());
echo $result->getString();

// Or save to a file
$result->saveToFile('path_to_save/qrcode.png');

// Or get dataUri
$dataUri = $result->getDataUri();
?>

Where are the endroid/qr-code docs?

The documentation for Endroid/qr-code can be found primarily in the README file on the package's GitHub page. You can also find more details about multiple configurations, integration with Symfony and Twig function usage in the documentation for Endroid QR Code Bundle if you're using Symfony. Additionally, specific usage details about writer options, round block size mode, QR code validity, and more, are copiously given in the same README.