packagist chillerlan/php-qrcode 6.0.0

7 hours ago

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 QRCode constructor now accepts an iterable as options, which is handed over to a new QROptions instance internally.
    • Extracted QRMatrix::getBooleanMatrix() from QRMatrix::getMatrix() to remove type ambiguity, the optional parameter $boolean has been removed.
    • Added PHPBench to run benchmarks (the results can be found in the benchmark branch).
    • Several bugfixes, cleanup, dependency updates, documentation update and examples.
  • Settings (QROptionsTrait)
    • [breaking] The property 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).
    • Split QR Code reader options into separate QRCodeReaderOptionsTrait.
    • The magic setter for QROptions::$eccLevel now also accepts the string values L, 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.
  • Output (QROutputInterface and child classes)
    • [breaking] The parameter $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.
    • Added QRInterventionImage (intervention/image) output.
    • Added XML output QRMarkupXML including an XSD schema qrcode.schema.xsd.
    • [possibly breaking] QRStringJSON overhaul, similar to XML output, including a JSON schema qrcode.schema.json.
    • The GD output class now also supports the avif format via QRGdImageAVIF.
    • QRFpdf::dump(): allow using external FPDF instance.
    • Extracted CssColorModuleValueTrait and RGBArrayModuleValueTrait for use in custom output classes.

Don't miss a new php-qrcode release

NewReleases is sending notifications on new releases.