v2.5.2
·
147 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixed
- Application updater still OOM'd post-download on 128M hosts (#219) — 2.5.1's streaming-download fix was only half the fight. The release archive still OOM'd at
guzzlehttp/psr7/Utils.php:124(Utils::copyToString) because a downstreamResponseReceivedlistener (Telescope-style) called$response->body()on the sink stream and pulled the whole ZIP back into a PHP string, andApplicationUpdateManager::extractUpdate()then loaded each ZIP entry into memory viagetFromIndex(). A newStreamsDownloadsToDisktrait shared by all three update sources wrapsHttp::sink()with awithResponseMiddlewarethat closes the sink body as soon as Guzzle hands the response back — before Laravel dispatchesResponseReceived, so any listener callingbody()gets an empty string instead of copying the archive.extractUpdate()now streams each ZIP entry with$zip->getStream()+ chunkedfread/fwriteinstead ofgetFromIndex(), so a single large file inside the release archive can't OOM mid-extraction either. Regression fences: one test per update source asserts the recorded PSR-7 response body is unreadable afterdownloadUpdate()returns, andApplicationUpdateManagerTestrunsextractUpdate()against a real ZIP under a scoped base path and confirms streamed extraction produces byte-for-byte copies. NotificationController::indexTypeErroron every admin poll (#220) —NotificationController::indexpassed the raw string from?limit=…straight toNotificationManager::getUserNotifications( int $limit, … ), tripping aTypeErrorunderstrict_typeson every admin poll (roughly every 30s) and drowningstorage/logs/laravel.login dozens of exceptions per minute. Swapped$request->input()for$request->integer()so the value is coerced at the controller boundary, and dropped the now-unneededphpcs:ignore. Existing validation (sometimes|integer|min:1|max:100) still rejects non-numeric input with a 422. A newNotificationControllerTestcovers the string→int coercion path, the default limit, and the validation-rejection regression fence.