Fix PDF downloads and clean up container bindings#148
Merged
Conversation
Contributor
|
✅ Playwright report published: https://fuermenschen.github.io/hfm/pr-148/ |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves PDF download reliability (especially for strict PDF viewers) by streaming raw DomPDF bytes in Livewire flows, and simplifies container/service registration by removing unnecessary bindings.
Changes:
- Stream DomPDF
output()bytes for invoice downloads (with explicitContent-Type: application/pdf) and update Livewire tests to assert clean PDF content. - Remove redundant concrete-class container singletons, keeping
CurrentDonationEventServiceas a scoped binding with an explanatory comment. - Modernize the datatable generator command metadata using Laravel command attributes and refresh checked-in Boost skill guidance files.
Reviewed changes
Copilot reviewed 8 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/Livewire/AssociationDonationFormTest.php | Strengthens notification assertions by validating the PDF payload decodes to real PDF bytes. |
| tests/Feature/Livewire/AdminAssociationDonationInvoiceFormTest.php | Adds assertions around Livewire download payload content to ensure raw PDF bytes are delivered. |
| app/Providers/AppServiceProvider.php | Cleans up container bindings; keeps a scoped binding for CurrentDonationEventService. |
| app/Console/Commands/MakeDatatableCommand.php | Moves command signature/description to attributes for cleaner command metadata. |
| app/Components/AdminAssociationDonationInvoiceForm.php | Switches from $pdf->stream() to $pdf->output() inside streamDownload() to avoid nested header output. |
| .github/skills/tailwindcss-development/SKILL.md | Skill doc refresh/formatting adjustments. |
| .github/skills/pulse-development/SKILL.md | Skill doc refresh/formatting adjustments. |
| .github/skills/pest-testing/SKILL.md | Skill doc refresh + adds guidance about make:test --pest naming to avoid duplicated directories. |
| .github/skills/livewire-development/SKILL.md | Skill doc refresh/formatting adjustments. |
| .github/skills/livewire-development/reference/javascript-hooks.md | Skill doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/SKILL.md | Skill doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/validation.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/testing.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/style.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/security.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/scheduling.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/routing.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/queue-jobs.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/migrations.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/mail.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/http-client.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/events-notifications.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/error-handling.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/eloquent.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/db-performance.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/config.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/collections.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/caching.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/blade-views.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/architecture.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/laravel-best-practices/rules/advanced-queries.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/fluxui-development/SKILL.md | Skill doc refresh/formatting adjustments (and updated component list). |
| .github/skills/debug-using-debugbar/SKILL.md | Skill doc refresh/formatting adjustments. |
| .github/skills/blaze-optimize/SKILL.md | Skill doc refresh/formatting adjustments. |
| .github/skills/blaze-optimize/references/folding-safety.md | Skill reference doc refresh/formatting adjustments. |
| .github/skills/blaze-optimize/references/advanced-optimization.md | Skill reference doc refresh/formatting adjustments. |
KaiFrehner
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PDF invoice downloads now stream clean PDF bytes for Livewire, avoiding nested DomPDF response output that could break strict PDF viewers. This also trims unnecessary service container bindings, keeps the datatable generator on Laravel command attributes, and refreshes checked-in Boost skill guidance.
Details
output()bytes with explicit PDF content type.Reviewer Setup
In this PR vs
origin/main, changes were made in PHP service registration, an Artisan command, Livewire PDF download tests, and checked-in Boost skills. You likely need to run:Fixes #39
Fixes #136
«He who is contented is rich.»
Laozi