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

Allow filesystem to be changed on config #4236

Merged
merged 1 commit into from Apr 24, 2017
Merged

Allow filesystem to be changed on config #4236

merged 1 commit into from Apr 24, 2017

Conversation

caiquecastro
Copy link
Contributor

Allow to change the filesystem storage on the fly.
For example, you can swap the storage disk with a fake one with
Storage::fake for tests.

@GrahamCampbell
Copy link
Member

Seems fair. 👍

@laurencei
Copy link
Contributor

Do you need the FILESYSTEM_DEFAULT and FILESYSTEM_CLOUD in the default .env.example though? It's starting to get fairly large in there...

So to clarify; I'm saying just have the changes to config/filesystem.php as part of this PR, and not the .env.example as well?

@caiquecastro
Copy link
Contributor Author

caiquecastro commented Apr 23, 2017

Removed the env variables from .env.example

@troccoli
Copy link

troccoli commented Apr 23, 2017 via email

@caiquecastro
Copy link
Contributor Author

Actually the default and cloud keys are mapped to disks array, so, after thinking more about it, it doesn't make sense to add them to .env, only if there are more disks declared on disks array.

@taylorotwell
Copy link
Member

Should be FILESYSTEM_DRIVER like the rest of the "default" values (queue, etc.)

@caiquecastro
Copy link
Contributor Author

So, should I replace FILESYSTEM_DEFAULT by FILESYSTEM_DRIVER? What about the cloud driver?

Allow to change the filesystem storage on the fly.
For example, you can swap the storage disk with a fake one with
Storage::fake for tests.
@taylorotwell
Copy link
Member

Yes.

Cloud variable name is fine.

@caiquecastro
Copy link
Contributor Author

Thanks. I'd updated the PR.

@ConnorVG
Copy link

Seeing _DRIVER and _CLOUD is semi-frustrating; especially considering _DRIVER and _CLOUD_DRIVER looks equally silly.

Bummer!

@taylorotwell taylorotwell merged commit 859479a into laravel:master Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants