Skip to content

Make it easier to swap out the loader, to allow for a custom loader #198

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

Closed
wants to merge 1 commit into from

Conversation

nathanmac
Copy link

Small PR which just moves the loader to a place where it can be easily overwritten to allow for custom loaders and adds a LoadedInterface

My particular use-case for this concerns some additional pre-processing steps necessary to allow the .env file to be readable, therefore requiring a custom loader with a minor addition to the existing loader, this would make it easier/cleaner to overwrite the loader in the Dotenv class.

@danhunsaker
Copy link

Doesn't look like this change actually lets you supply your own loader instance at any point... It just adjusts the abstraction a bit to call a method rather than directly construct anything inline.

@nathanmac
Copy link
Author

That's correct the idea was to remove the double instantiation so the get loader method could be overwritten in a single place, this appears to have been addressed in another PR #215.

@nathanmac nathanmac closed this Jan 16, 2017
@GrahamCampbell
Copy link
Collaborator

GrahamCampbell commented Jan 28, 2019

@nathanmac NB Further improvements have been made in 3.x series. :)

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.

3 participants