Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'BaconQrCode\Renderer\Image\Png' not found #34

Closed
brvnks opened this issue May 25, 2018 · 3 comments
Closed

Class 'BaconQrCode\Renderer\Image\Png' not found #34

brvnks opened this issue May 25, 2018 · 3 comments

Comments

@brvnks
Copy link

brvnks commented May 25, 2018

Hello, i'm following this tutorial and when i'm going to register the client in my newsboard app, this error always appear.

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class 'BaconQrCode\Renderer\Image\Png' not found

public function getQRCodeInline($company, $holder, $secret, $size = 200, $encoding = 'utf-8')
{
$url = $this->getQRCodeUrl($company, $holder, $secret);

    $renderer = new Png();
    $renderer->setWidth($size);
    $renderer->setHeight($size);

    $bacon = new BaconQrCodeWriter($renderer);
    $data = $bacon->writeString($url, $encoding);

    return 'data:image/png;base64,'.base64_encode($data);
}

can you help me with that?
remembering that your bacon package is already installed, and i did it again, revert on gitkraken and did it again all the packages and its not working :(

@evannamonpinion
Copy link

did you try using this ?
composer require bacon/bacon-qr-code 1.0.3

source: cwt137/google-laravel-2fa#2

i just followed this one and fixed the error, try deleting the vendor folder and re install baconQr with this one

@sergiq
Copy link

sergiq commented Oct 25, 2018

The problems comes from the version of the bacon/bacon-qr-code. This pack is not compatible with the last-stable version of bacon/bacon-qr-code (^2.0.0). This lib should requires the library in a certain revision range (^1.0.0).

@sergiq
Copy link

sergiq commented Oct 25, 2018

Duplicate of #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants