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

Fix save method if there are no image manipulations #847

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

moisish
Copy link
Contributor

@moisish moisish commented May 31, 2024

After the change on this commit bf0307c#diff-a4f3311910f99a1fe69b5fab2bcdb806288e552fe7ad5610ddb90f6a331aca37 the save method requires the spatie/image dependency even if you don't have any image manipulations.

Previously you could save an image without the need of the image dependency.

This test couldn't catch the issue because the dependency is not missing.

it('can take a high density screenshot', function () {
    $targetPath = __DIR__.'/temp/testScreenshot.png';

    Browsershot::url('https://example.com')
        ->deviceScaleFactor(2)
        ->save($targetPath);

    expect($targetPath)->toBeFile();
});

@moisish
Copy link
Contributor Author

moisish commented May 31, 2024

The tests are passing on my machine not sure why they are failing

@freekmurze freekmurze merged commit a080a60 into spatie:main Jun 4, 2024
1 of 5 checks passed
@freekmurze
Copy link
Member

Thanks!

@clementmas
Copy link
Contributor

I was about to PR that fix after seeing some local Class "Imagick" not found errors. Thanks @moisish!

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

Successfully merging this pull request may close these issues.

3 participants