chillerlan / php-qrcode

A PHP QR Code generator and reader with a user-friendly API.
https://smiley.codes/qrcode/
Apache License 2.0
2.01k stars 302 forks source link

BC break 3.3.0 => 3.4.0 SVG base64 #67

Closed boesing closed 3 years ago

boesing commented 3 years ago

Hey there,

after upgrading to 3.4.0, the QR Code for SVG changed by default to base64. Not sure if thats a BC break in 4.x aswell.

Would love if this is being fixed somehow.

Thanks in advance.

codemasher commented 3 years ago

I'm aware that this might have caused a minor BC break as these changes are a backport from the 4.x branch. It's because QROptions::$imageBase64 is set to true by default ever since and SVG & PDF output now also use this variable. I decided to keep the behaviour consistent across all built-in output modes that support base64 output, rather than keeping the inconsitency by introducing separate variables for each built-in mode. I understand that this might be an inconvenience, but since the overwhelming majority of implementations is using the default options (PNG/base64), i took the risk in favor of more convenient SVG usage within <img> tags. I have updated the 3.4.0 update notes accordingly. Sorry for the troubles caused!