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!
Changelog
- General
- The required minimum PHP version is now 8.2.
- The
QRCodeconstructor now accepts aniterableas options, which is handed over to a newQROptionsinstance internally. - Extracted
QRMatrix::getBooleanMatrix()fromQRMatrix::getMatrix()to remove type ambiguity, the optional parameter$booleanhas been removed. - Added PHPBench to run benchmarks (the results can be found in the
benchmarkbranch). - Several bugfixes, cleanup, dependency updates, documentation update and examples.
- Settings (
QROptionsTrait)- [breaking] The property
QROptions::$outputTypeand the related constants inQROutputInterfacehave been removed. The output type is now specified viaQROptions::$outputInterfacewith the default value ofQRMarkupSVG::class. (#223). - Split QR Code reader options into separate
QRCodeReaderOptionsTrait. - The magic setter for
QROptions::$eccLevelnow also accepts the string valuesL, M, Q, H(case-insensitive) - these will be converted internally to the respective integers. (#160). - The property
QROptions::$scale(module scaling for several raster image output classes) is now clamped between 1 and 50.
- [breaking] The property
- Output (
QROutputInterfaceand child classes)- [breaking] The parameter
$transformof the methodQROutputAbstract::collectModules(Closure $transform)has been removed in favor of a methodQROutputAbstract::moduleTransform():mixed|nullwhich is called with the same parameters. - Added
QRInterventionImage(intervention/image) output. - Added XML output
QRMarkupXMLincluding an XSD schemaqrcode.schema.xsd. - [possibly breaking]
QRStringJSONoverhaul, similar to XML output, including a JSON schemaqrcode.schema.json. - The GD output class now also supports the avif format via
QRGdImageAVIF. QRFpdf::dump(): allow using externalFPDFinstance.- Extracted
CssColorModuleValueTraitandRGBArrayModuleValueTraitfor use in custom output classes.
- [breaking] The parameter