Releases: chillerlan/php-qrcode
5.0.4
5.0.3
- PHP 8.4 support (implicit nullable types are deprecated) (#276)
- ECI decoding now allows for numeric and alphanumeric segments to be preceded by an ECI designator (#289)
- simplified Number and AlphaNum classes (backport from dev-main. v6)
- QRFpdf::dump() now accepts an
FPDFinstance as second optional parameter - dependency & CI updates
- fixed the broken PHPCS config
- added Slevomat Coding Standard
- added PHP Compatibility Coding Standard
- added PHPStorm code style
4.4.2
- PHP 8.4 support (implicit nullable types are deprecated)
- dependency & CI updates
5.0.2
- fixed 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 version, added a safety margin of 4 bits, which forces the next available version in that case.
5.0.1
4.4.1
5.0.0
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!
New Features
- QR Code reader based on a PHP port of the ZXing library
- MIT and Apache 2.0 dual licensing to accommodate the ZXing related files, see: NOTICE
- Proper mixed mode support (several data mode segments can appear in the same QR symbol)
- Simplified Chinese (Hanzi/GB2312) support according to GBT18284-2000
- ECI mode support
Structured append mode(not yet...)
- Full "reversed reflectance" support (inverted matrix colors)
- Encapsulated Postscript (EPS) output
- An all new documentation at https://php-qrcode.readthedocs.io/en/v5.0.x/ in favor over the wiki
- A truckload of new examples
Changes
- [breaking] The default output has been changed from PNG (GdImage) to SVG. No image processing extension (
ext-gdorext-imagick) required anymore! - [breaking] The default output format of the built-in output classes is now a base64 data URI (if applicable) so that it can be directly embedded as
srcinto an<img>tag. This can be disabled by settingQROptions::$outputBase64tofalse. - [breaking] The default value of
QROptions::$imageTransparenthas been set tofalsedue to various issues and misconceptions with transparency in GD and ImageMagick, therefore: use at your own risk. - [breaking] The values of the
QRMatrix::M_*constants and therefore the keys of theQROptions::$moduleValuesarray have changed.QRMatrix::M_*_DARKconstants 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). - [breaking] The output class
QRMarkuphas been changed toabstract, inheritors are nowQRMarkupHTMLandQRMarkupSVG(QRMarkupXMLanyone?). - [possibly breaking] The
fill-opacityattribute (and its respective settingQROptions::$svgOpacity) has been removed fromQRMarkupSVG::path()as it can be set by CSS. - [possibly breaking] The
QROptions::$markupDarkandQROptions::$markupLightsettings have been removed - they can be set via overridingQRMarkup::getDefaultModuleValue(). - [possibly breaking] The
QROptions::$textDarkandQROptions::$textLightsettings have been removed - they can be set via overridingQRString::getDefaultModuleValue(). - The module value validation method
QROutputInterface::moduleValueIsValid()is nowpublic 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. - The GD output class now also supports BMP and WEBP output.
- The formerly GD exclusive options
QROptions::$jpegQualityandQROptions::$pngCompressionhave been deprecated in favor of the more genericQROptions::$quality. - The setting
QROptions::$svgUseFillAttributeshas been added to togglefillattributes on the SVG<path>elements inQRMarkupSVG::path()(this was previously done via settingQROptions::$markupDarkandQROptions::$markupLightto an empty value).
4.4.0
Maintenance release
This release serves as the final v4.x release and as an intermediate to v5 (unless something weird happens and I have to backport a bugfix or so...) - both versions support PHP 7.4+, so there's actually no reason to hold onto v4.x unless you're running extensive custom output classes, in which case this release is for you.
- added
QRMatrix::M_*_DARKconstants for convenience (v5 backport). These constants should have been added way earlier as the current way to specify theQROptions:$moduleValuesis highly unintuitive. - added PHPCS and PHPMD configurations as well as a
.editorconfig - changed the values of
QRMatrix::M_DARKMODULEandQRMatrix::M_FINDER_DOTto reflect their supposed dark values,QRMatrix::M_DARKMODULE_LIGHTandQRMatrix::M_FINDER_DOT_LIGHThave been added with the original values as placeholders for reflectance reversal. This change is backward incompatible, however, the worst that can happen is that the module values (if specified) will fall back to their internal defaults. - changed the default values of
QROptions::$textDarkandQROptions::$textLightfrom🔴and⭕to██and░░, respectively. (see here) - removed
publicandexamplesnamespaces fromautoload-dev - removed Scrutinizer CI in favour of Codacy
- cleanup: all examples are now self-contained
- dependency updates
- CI updates
5.0-beta
It's here! The main public API is finished so far. What's left is some cleanup and documenting. Check out the release notes and feel free to leave feedback in the linked discussion thread. Thanks!
{
"minimum-stability": "beta",
"prefer-stable": true,
"require": {
"php": "^7.4 || ^8.0",
"chillerlan/php-qrcode": "5.0-beta"
}
}4.3.4
- Fixed
QRCode::isByte(): string "0" fails with empty() - Require
chillerlan/php-settings-container: ^2.1.4to fix a PHP 8.1 deprecation warning. See chillerlan/php-settings-container#2 - CI updates