From d0677640d2fa02276883b490397d83342dd92234 Mon Sep 17 00:00:00 2001
From: Dave Long <dave@longwaveconsulting.com>
Date: Sat, 3 Feb 2024 17:00:24 +0000
Subject: [PATCH] Issue #3415706 by kim.pepper, smustgrave, longwave: Deprecate
 unused constant BYTES_TO_READ in FileUploadResource and
 TemporaryJsonapiFileFieldUploader

---
 .../file/src/Plugin/rest/resource/FileUploadResource.php    | 6 ++++++
 .../src/Controller/TemporaryJsonapiFileFieldUploader.php    | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php b/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
index 35211cbf84b5..5b54ca2a725c 100644
--- a/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
+++ b/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
@@ -79,6 +79,12 @@ class FileUploadResource extends ResourceBase {
    * The amount of bytes to read in each iteration when streaming file data.
    *
    * @var int
+   *
+   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
+   * \Drupal\file\Upload\InputStreamFileWriterInterface::DEFAULT_BYTES_TO_READ
+   * instead.
+   *
+   * @see https://www.drupal.org/node/3380607
    */
   const BYTES_TO_READ = 8192;
 
diff --git a/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php b/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php
index 7e348af06d8b..6a77e33c6c1d 100644
--- a/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php
+++ b/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php
@@ -63,6 +63,12 @@ class TemporaryJsonapiFileFieldUploader {
    * The amount of bytes to read in each iteration when streaming file data.
    *
    * @var int
+   *
+   * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
+   * \Drupal\file\Upload\InputStreamFileWriterInterface::DEFAULT_BYTES_TO_READ
+   * instead.
+   *
+   * @see https://www.drupal.org/node/3380607
    */
   const BYTES_TO_READ = 8192;
 
-- 
GitLab