From a285c0c1fe066d2407b33d51418ce91da86bb8e1 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Thu, 25 Jun 2026 21:46:35 -0300 Subject: [PATCH] revert(youtube): drop the unverified chunked-upload guard YouTube uploads through the Google API client's resumable handler, not our HTTP client, so the leak couldn't be reproduced for it and the nextChunk loop can't be exercised by a test without making the Google client injectable. Keeping this PR to changes that are both reproduced and covered by a test (X and LinkedIn); YouTube is tracked separately. --- app/Services/Social/YouTubePublisher.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/Services/Social/YouTubePublisher.php b/app/Services/Social/YouTubePublisher.php index b4f1496b..5b4467c5 100644 --- a/app/Services/Social/YouTubePublisher.php +++ b/app/Services/Social/YouTubePublisher.php @@ -167,9 +167,6 @@ private function publishShort(PostPlatform $postPlatform, $media, SocialAccount while (! $uploadStatus && ! feof($handle)) { $chunk = fread($handle, self::CHUNK_SIZE); $uploadStatus = $mediaUpload->nextChunk($chunk); - - unset($chunk); - $this->freeChunkMemory(); } fclose($handle);