Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300228

Deprecate file_directory_temp() and move to FileSystem service

$
0
0

Problem/Motivation

file_directory_temp() is a procedural function in file.inc and contains some interesting logic. If there is no value set in config, it will call getOsTemporaryDirectory(), and if that isn't set, it will fall back to public://tmp/

It then sets this value in config.

Proposed resolution

Remove the need for the config system, and instead use Settings, just like the private file system path.

Provide BC for config set values, and use the fall backs as we currently do if not set in Settings. However, do not set config.

Remaining tasks

  1. Implement it.
  2. Find a way to trigger deprecations
  3. Add a requirements check if it is not set in settings.
  4. Make the file system temp dir settings form field read only, so users cannot update it (or just display it like private filesystem dir)

User interface changes

Users will no longer be able to set the temp directory from the file system settings form.

API changes

file_directory_temp() is deprecated.

Data model changes

Release notes snippet

Follow up to #3034072: Move file uri/scheme functions from file.inc and FileSystem to StreamWrapperManager


Viewing all articles
Browse latest Browse all 300228

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>