3494126 - Moved the file_get_content_headers() to File Entity
Closes #3494126
Merge request reports
Activity
Filter activity
- Resolved by Kim Pepper
added 1 commit
- 9cb1b395 - 3494126 - Replaced the file_get_content_headers with Entity method
- Resolved by Ramprassad Suresh
- Resolved by Ramprassad Suresh
- Resolved by Kim Pepper
You don't need tests to trigger deprecations: https://www.drupal.org/about/core/policies/core-change-policies/how-to-deprecate#how point 3.2
300 300 Cache::invalidateTags($tags); 301 301 } 302 302 303 /** 304 * Examines a file entity and returns content headers for download. 305 * 306 * @return array 307 * An associative array of headers, as expected by 308 * \Symfony\Component\HttpFoundation\StreamedResponse. 309 */ 310 public function getFileContentHeaders() { changed this line in version 6 of the diff
added 1 commit
- 360db133 - 3494126 - changed method to getDownloadHeaders()
34 34 * @return array 35 35 * An associative array of headers, as expected by 36 36 * \Symfony\Component\HttpFoundation\StreamedResponse. 37 * 38 * @deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Instead, use $file->getDownloadHeaders(). 39 * @see https://www.drupal.org/node/3494172 37 40 */ 38 41 function file_get_content_headers(FileInterface $file) { 42 @trigger_error(__METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Instead, use $file->getDownloadHeaders(). See https://www.drupal.org/node/3494172', E_USER_DEPRECATED); 39 43 return [ 40 44 'Content-Type' => $file->getMimeType(), 41 45 'Content-Length' => $file->getSize(), 42 46 'Cache-Control' => 'private', 43 47 ]; changed this line in version 9 of the diff
added 1 commit
- b2463bb3 - 3494126 - Updated call to getDownloadHeaders()
- Resolved by Ramprassad Suresh
Please register or sign in to reply