Closed kamleshwebtech closed 4 years ago
Hi @kamleshwebtech the QrCode class does not have a setPadding method, only a setMargin. So you could use that.
I've run into the same issue after updating the package to 3.x. Looking back at version 1.x, the function setPadding did exist: https://github.com/endroid/qr-code/blob/c9644bec2a9cc9318e98d1437de3c628dcd1ef93/src/QrCode.php#L472
Is there some resource or further information about breaking changes between versions? Or a guide for migrating to a newer version?
Hi @tharkay unfortunately I did not have the time to write a migration guide so I think it is good to test your code thoroughly when upgrading. And if possible I would advise to upgrade to 4.x instead of 3.x because that is the currently maintained version.
I am using your qr-code library and my code is as:
But when i run above code on local system, it generates a Fatal error:
Fatal error: Uncaught Error: Call to undefined method Endroid\QrCode\QrCode::setPadding() in D:\xampp\htdocs\sites\test\07-qrcode\index.php:13 Stack trace: #0 {main} thrown in D:\xampp\htdocs\sites\test\07-qrcode\index.php on line 13
line number 13 code is "header('Content-Type: '.$qrCode->getContentType());" as above code.
Please suggest what is the solution to fix this issue. Thanks a lot :)
Look forward to hear you.