NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #292 most downloaded on Packagist
A QR Code generator and reader with a user-friendly API. PHP 8.2+
Last release 6 months ago
18 Mar 2026
Ships fairly regularly
a new release about every 8 months
Rarely documented
notes for 10 of 45 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
45 releases · first in 2017
The following methods (property getters) have been deprecated in favor of asymmetric visibility , which is available as of PHP 8.4 and which is the mi…
The following methods (property getters) have been deprecated in favor of asymmetric visibility, which is available as of PHP 8.4 and which is the minimum requirement of the next major version (v7) of php-qrcode.
The QRMatrix class will see an addition of a magic getter that emulates the future behaviour as an upgrade path, the other methods are only used internally and will see no such addition for the time being.
| method | replacement |
|---|---|
BitBuffer::getBuffer() |
BitBuffer::$buffer |
BitBuffer::getLength() |
BitBuffer::$length |
Detector::getFinderPatterns() |
Detector::$finderPatterns |
EccLevel::getLevel() |
EccLevel::$level |
ECICharset::getID() |
ECICharset::$charsetID |
FinderPattern::getCount() |
FinderPattern::$count |
GenericGFPoly::getCoefficients() |
GenericGFPoly::$coefficients |
LuminanceSourceInterface::getHeight() |
LuminanceSourceInterface::$height |
LuminanceSourceInterface::getWidth() |
LuminanceSourceInterface::$width |
LuminanceSourceInterface::getLuminances() |
LuminanceSourceInterface::$luminances |
MaskPattern::getPattern() |
MaskPattern::$currentPattern |
QRData::getBitBuffer() |
QRData::$bitBuffer |
QRMatrix::getEccLevel() |
QRMatrix::$eccLevel |
QRMatrix::getMaskPattern() |
QRMatrix::$maskPattern |
QRMatrix::getMatrix() |
QRMatrix::$matrix |
QRMatrix::getSize() |
QRMatrix::$moduleCount |
QRMatrix::getVersion() |
QRMatrix::$version |
ResultPoint::getEstimatedModuleSize() |
ResultPoint::$estimatedModuleSize |
ResultPoint::getX() |
ResultPoint::$x |
ResultPoint::getY() |
ResultPoint::$y |
Version::getVersionNumber() |
Version::$versionNumber |
The following properties as well as the method copyVars() in QROutputAbstract will be removed in v7 without replacement,
as they only existed to improve performance by circumventing the magic getters in the QROptions class - these are replaced by (set) property hooks where unnecessary overhead is reduced. Some of the built-in output classes may see the re-addition of some of these properties locally, depending on the performance impact.
QROutputAbstract::$excludeFromConnect
QROutputAbstract::$keepAsSquare
QROutputAbstract::$connectPaths
QROutputAbstract::$eol
QROutputAbstract::$drawCircularModules
QROutputAbstract::$drawLightModules
QROutputAbstract::$circleRadius
These changes are already in dev-main.
One column per quarter.
Hi, I've kept you waiting for too long now, so I'm going to release it "as is". Originally I planned to add support for creating Structured Append QR
Hi, I've kept you waiting for too long now, so I'm going to release it "as is". Originally I planned to add support for creating Structured Append QR Codes but I'm currently lacking the mental capacity to wrap my head around this concept (a method to calculate the parity already exists in the code, feel free to submit a PR!).
Once again, a big thank you to everyone who submitted issue reports and opened discussions and helped to improve this library!
IMPORTANT: v6 will be branched out and the main branch will remain the active development branch towards v7. If you have used the composer version dev-main without a commit hash in the past, please make sure to update the requirement ASAP. You have been warned.
For feedback and questions please head over to the linked discussion!
QRCode constructor now also accepts an iterable as options, which is handed over to a new QROptions instance internally.QRMatrix::getBooleanMatrix() from QRMatrix::getMatrix() to remove type ambiguity, the optional parameter $boolean has been removed.benchmark branch).QROptionsTrait)
QROptions::$outputType and the related constants in QROutputInterface have been removed. The output type is now specified via QROptions::$outputInterface with the default value of QRMarkupSVG::class. (#223).QRCodeReaderOptionsTrait.QROptions::$eccLevel now also accepts the string values L, M, Q, H (case-insensitive) - these will be converted internally to the respective integers. (#160).QROptions::$scale (module scaling for several raster image output classes) is now clamped between 1 and 50.QROutputInterface and child classes)
$transform of the method QROutputAbstract::collectModules(Closure $transform) has been removed in favor of a method QROutputAbstract::moduleTransform():mixed|null which is called with the same parameters.QRInterventionImage (intervention/image) output.QRMarkupXML including an XSD schema qrcode.schema.xsd.QRStringJSON overhaul, similar to XML output, including a JSON schema qrcode.schema.json.QRGdImageAVIF.QRFpdf::dump(): allow using external FPDF instance.CssColorModuleValueTrait and RGBArrayModuleValueTrait for use in custom output classes.PHP 8.5 support ( imagedestroy() deprecation)
imagedestroy() deprecation)$transform of the method QROutputAbstract::collectModules(Closure $transform) has been deprecated in favor of the newly introduced method QROutputAbstract::moduleTransform() with the same parameters as the anonymous closure. The parameter will be removed in v6.empty() have been replaced with more precise checks.hand over finder pattern coordinates to the decoder result
PHP 8.4 support (implicit nullable types are deprecated)
FPDF instance as second optional parameterfixed a bug in the QR Code version auto detection when the given data segment was the exact same bit size as the maximum for the guessed provisional v
ReedSolomonDecoder now throws a QRCodeDecoderException instead of the generic QRCodeException
ReedSolomonDecoder now throws a QRCodeDecoderException instead of the generic QRCodeException.gitattributes file (#234)QRMatrix) and type safety (MaskPattern) improvements…such as micro QR. A lot of things have been deprecated and moved in order to clean up for v6 which is intended to support PHP 8.2+ (or maybe 8.3+ even…
Hi! It's been a while since the last major version - has it already been over three years and seven million downloads??? Time flies...
v5 was supposed to be released earlier this year already, but various health issues kept me from working on it and I kept y'all waiting and using dev-main and the v5-beta instead - but hey, the wait is over now!
The new version comes with countless internal changes, mostly to incooperate the ZXing QR Code reader and open the possibility for other types of barcodes, such as micro QR.
A lot of things have been deprecated and moved in order to clean up for v6 which is intended to support PHP 8.2+ (or maybe 8.3+ even). See the attached discussion thread for a full list of changes and deprecations.
IMPORTANT: v5 will be branched out and the main branch will become (or rather remain) the active development branch towards v6. If you have used the composer version dev-main without a commit hash in the past, please make sure to update the requirement ASAP. You have been warned.
Also, a big thank you to everyone who submitted issue reports and opened discussions and helped to improve this library!
ext-gd or ext-imagick) required anymore!src into an <img> tag. This can be disabled by setting QROptions::$outputBase64 to false.QROptions::$imageTransparent has been set to false due to various issues and misconceptions with transparency in GD and ImageMagick, therefore: use at your own risk.QRMatrix::M_* constants and therefore the keys of the QROptions::$moduleValues array have changed. QRMatrix::M_*_DARK constants have been introduced for convenience. The module values are now a proper bitmask, the dark value is now calculated (QRMatrix::M_* | QRMatrix::IS_DARK) instead of (QRMatrix::M_* << 8).QRMarkup has been changed to abstract, inheritors are now QRMarkupHTML and QRMarkupSVG (QRMarkupXML anyone?).fill-opacity attribute (and its respective setting QROptions::$svgOpacity) has been removed from QRMarkupSVG::path() as it can be set by CSS.QROptions::$markupDark and QROptions::$markupLight settings have been removed - they can be set via overriding QRMarkup::getDefaultModuleValue().QROptions::$textDark and QROptions::$textLight settings have been removed - they can be set via overriding QRString::getDefaultModuleValue().QROutputInterface::moduleValueIsValid() is now public static, so that input values can be checked before invoking the options, e.g. QRMarkupSVG::moduleValueIsValid('#aabbcc'). Please note that in case of HTML and SVG it will only check for the basic syntax, it will not validate or sanitize the values.QROptions::$jpegQuality and QROptions::$pngCompression have been deprecated in favor of the more generic QROptions::$quality.QROptions::$svgUseFillAttributes has been added to toggle fill attributes on the SVG <path> elements in QRMarkupSVG::path() (this was previously done via setting QROptions::$markupDark and QROptions::$markupLight to an empty value).PHP 8.4 support (implicit nullable types are deprecated)
added a .gitattributes file ( #234 ) dependency updates
.gitattributes file (#234)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →