Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Add read-only filesystem adapter decoration as a config option #44079

Merged
merged 4 commits into from
Sep 12, 2022
Merged

[9.x] Add read-only filesystem adapter decoration as a config option #44079

merged 4 commits into from
Sep 12, 2022

Conversation

frankdejonge
Copy link
Contributor

@frankdejonge frankdejonge commented Sep 10, 2022

This PR adds the ability to configure a disk to operate in read-only mode. When this option is set to true, the underlying adapter is decorated with an implementation that ensures no write operation is possible on the disk. This is useful when you're receiving files through a shared storage, but you shouldn't manipulate any of the files stored.

If interested, I can also add a PR to include a path prefixing decorator: https://flysystem.thephpleague.com/docs/adapter/path-prefixing/

@driesvints driesvints changed the title [PROPOSAL] Add read-only filesystem adapter decoration as a config option. [9.x] Add read-only filesystem adapter decoration as a config option Sep 12, 2022
composer.json Show resolved Hide resolved
@taylorotwell
Copy link
Member

taylorotwell commented Sep 12, 2022

@frankdejonge is there any need for us to pass any of these options like temporary_url?

CleanShot 2022-09-12 at 09 01 37@2x

@driesvints
Copy link
Member

@taylorotwell those options are still passed as the new adapter is just a decorator.

@taylorotwell taylorotwell merged commit e5ffa1b into laravel:9.x Sep 12, 2022
@taylorotwell
Copy link
Member

Ah, sorry - read the code wrong.

@frankdejonge frankdejonge deleted the feature/read-only-filesystem branch September 12, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants