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 setting the name via download() #139

Merged
merged 2 commits into from
May 8, 2024
Merged

Conversation

stevethomas
Copy link
Contributor

@stevethomas stevethomas commented May 8, 2024

We had a test like this that was failing after updating to 1.5:

 Pdf::assertRespondedWithPdf(fn (PdfBuilder $pdf) => $pdf->downloadName === $invoice->filename));

The reason being that $pdf->downloadName is still an empty string, despite calling ->download($invoice->filename) in the controller.

I believe this fixes #138.

Oddly enough some tests including the pdf function download accepts a name parameter and sets downloadName failed on the old implementation, so not sure how that one got through 🤷‍♂️

@stevethomas stevethomas changed the title Fix setting then name via download() Fix setting the name via download() May 8, 2024
@freekmurze freekmurze merged commit 93a6c0b into spatie:main May 8, 2024
1 check passed
@freekmurze
Copy link
Member

Thanks!

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.

[Bug]: Incorrect Default Download Name Handling in PdfBuilder download Method
2 participants