Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an idea - the unittest isn't perfect (two classes in one file) and the whole could be breaking if someone tries to create the FileSystemRepository by his own. The documented API keeps intakt and isn't breaking.
This line is the key part of the whole PR:
It utilizes the container to create the repository class and passes in the factory and the whole config array. This way the repository can use every container service binding in its construct and access every config key. So custom repositories could also add custom keys - like spreadsheet access data to pull data from a Google Spreadsheet or Contentful credentials or whatever the user wants to use as the base of his repository.
It's again part of my Stancy project to allow the users switch to any other common service as data/content storage. At the end it could even use an API in the background to retrieve weather data or whatever.
PS: I've run StyleCI over the whole repo - that's why some files are changed which aren't part of the original commit.