Alter the public stream wrapper to log when it's used

Created on 3 May 2016, almost 9 years ago
Updated 9 August 2023, over 1 year ago

I'm working on a project where we can't use public storage at all - it's S3 / CDN storage or nothing at all. Drupal core currently requires public files, but with the other work going on we're making good progress towards eliminating public storage.

However, since it's still a requirement, it's entirely possible for core or contrib code to hardcode public:// URIs. Drupal 7 modules offered stream wrappers that altered out the public wrapper, but they were fragile and had performance problems with code that assumed public streams were equivalent to local disk.

Our thought is to start by altering the public wrapper, but to not actually redirect to a scheme and to just log when it's used. Later, we would add an option to throw hard exceptions when using the public wrapper. Or perhaps even support redirecting to a flysystem adapter, being sure to document the performance and stability issues with it.

✨ Feature request
Status

Postponed

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada deviantintegral

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024