Replace ZipStream with native ZipArchive for FrankenPHP compatibility

ZipStream writes via fwrite(php://output) which FrankenPHP silently
drops, resulting in 0-byte ZIP downloads. Switch to ZipArchive to build
the ZIP as a temp file on disk, then serve with response()->download().

- Rewrite download() to use ZipArchive + BinaryFileResponse
- Remove decryptFileToCallback() from FileEncryptionService
- Update tests for BinaryFileResponse instead of StreamedResponse
- Remove maennchen/zipstream-php dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
surtic86
2026-02-25 20:34:05 +01:00
co-authored by Claude Opus 4.6
parent e37b322dde
commit 729e01462b
5 changed files with 127 additions and 133 deletions
-1
View File
@@ -15,7 +15,6 @@
"laravel/octane": "^2.13",
"laravel/tinker": "^2.10.1",
"livewire/livewire": "^4.0",
"maennchen/zipstream-php": "^3.2",
"robsontenorio/mary": "^2.7"
},
"require-dev": {