Skip to content

Fix PDF downloads and clean up container bindings#148

Merged
smnmsr merged 4 commits into
mainfrom
fix/pdf-download-and-container-cleanup
Jun 3, 2026
Merged

Fix PDF downloads and clean up container bindings#148
smnmsr merged 4 commits into
mainfrom
fix/pdf-download-and-container-cleanup

Conversation

@smnmsr
Copy link
Copy Markdown
Collaborator

@smnmsr smnmsr commented Jun 2, 2026

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

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:

php artisan boost:update
php artisan optimize:clear

Fixes #39
Fixes #136


«He who is contented is rich.»
Laozi

@smnmsr smnmsr marked this pull request as ready for review June 2, 2026 19:58
Copilot AI review requested due to automatic review settings June 2, 2026 19:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

✅ Playwright report published: https://fuermenschen.github.io/hfm/pr-148/
This link updates on each run for this PR. Older PRs/branches remain available under their own subfolder.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 explicit Content-Type: application/pdf) and update Livewire tests to assert clean PDF content.
  • Remove redundant concrete-class container singletons, keeping CurrentDonationEventService as 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.

Comment thread tests/Feature/Livewire/AdminAssociationDonationInvoiceFormTest.php
@smnmsr smnmsr requested a review from KaiFrehner June 2, 2026 20:03
@smnmsr smnmsr added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 6b41ac5 Jun 3, 2026
12 checks passed
@smnmsr smnmsr deleted the fix/pdf-download-and-container-cleanup branch June 3, 2026 12:12
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.

Audit all container-registered classes: remove unnecessary bindings Generated PDFs fail to render in Firefox PDF viewer on Android

3 participants