endroid / qr-code

QR Code Generator
https://endroid.nl
MIT License
4.41k stars 725 forks source link

Call to undefined method Endroid\QrCode\QrCode::create() #439

Closed musiquero closed 7 months ago

musiquero commented 7 months ago

It may be something very simple, but I've been busting my head and can't find the solution. I did the installation with composer, but it always gives me an error with the imported method. I have tried with the code as it appears here at the beginning and as it appears in the YT video. But the result is always the same.

Call to undefined method Endroid\QrCode\QrCode::create()

PHP Fatal error: Uncaught Error: Class "Endroid\QrCode\Builder\Builder" not found in /...

endroid commented 7 months ago

Hi @musiquero what version do you have installed according to you composer.lock file? And if you go to the QrCode class can you find a create method or what do you see?

Hoream-Ngoding commented 7 months ago

i experienced the same problem. you can see in my screenshot that the PngWriter class is not read.

errorr

sorry if my language is not good. I used Google Translate and I hope you understand. thanks.

endroid commented 7 months ago

Hi @hallosatria347 the same question for you: what version do you have installed according to your composer.lock file? Also you can check the vendor/endroid/qr-code folder and see if the class PngWriter exists in the Endroid\QrCode\Writer namespace. If so, your autoloading is broken. Please let me know.