Closed deepakchandrawanshi1063 closed 1 year ago
Hi @deepakchandrawanshi1063 your code breaks on union types, which are introduced in PHP 8.0. You should use at least PHP 8.0 when using this library. Older PHP versions are not supported. Good luck!
but i am already using php 8.2.4 , composer 2.5.5 and "endroid/qr-code": "^4.8" .
Hi @deepakchandrawanshi1063 sorry but I can not find another reason for this issue, as the pipe / union is supported since PHP 8.0 and my tests agains all PHP versions succeed (see https://github.com/endroid/qr-code/actions). In other words: from this end I can not do anything to debug or fix the issue in your environment.
You could try to output the PHP version from your script using echo PHP_VERSION
from the same script to make 100% what PHP version it is running under. Or if you can provide an MR containing a failing test case I can look into it. Good luck again :)
Error :
An uncaught Exception was encountered
Code :
use Endroid\QrCode\Color\Color; use Endroid\QrCode\Encoding\Encoding; use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelLow; use Endroid\QrCode\QrCode; use Endroid\QrCode\Label\Label; use Endroid\QrCode\Logo\Logo; use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeMargin; use Endroid\QrCode\Writer\PngWriter; use Endroid\QrCode\Writer\ValidationException;
`public function getQR($data){