This repository was archived by the owner on Sep 15, 2022. It is now read-only.
Add option to choose Doctrine service name for Alice fixtures#190
Closed
michaelperrin wants to merge 1 commit intoKnpLabs:masterfrom
michaelperrin:feature/doctrine-service-option
Closed
Add option to choose Doctrine service name for Alice fixtures#190michaelperrin wants to merge 1 commit intoKnpLabs:masterfrom michaelperrin:feature/doctrine-service-option
michaelperrin wants to merge 1 commit intoKnpLabs:masterfrom
michaelperrin:feature/doctrine-service-option
Conversation
| ``` | ||
|
|
||
| Load all files | ||
| Load all files |
Author
There was a problem hiding this comment.
Sorry for trailing whitespace removal, but that's not that bad after all!
Contributor
|
Please add unit tests |
| $loader->clearCache()->willReturn(null); | ||
| $fixtures = [ 'User' => 'user.yml', 'Product' => 'product.yml', 'Place' => 'place.yml' ]; | ||
| $config = [ 'alice' => [ 'fixtures' => $fixtures, 'dependencies' => [] ]]; | ||
| $config = [ 'doctrine' => [ 'service' => 'doctrine' ], 'alice' => [ 'fixtures' => $fixtures, 'dependencies' => [] ]]; |
Contributor
There was a problem hiding this comment.
Can you also run tests in this file, but with alternative configuration (like doctrine_mongodb)? Could be interesting to check its compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 PR introduces MongoDB compatibility for FriendlyContexts Alice Context so that fixtures can be persisted in a project using MongoDB.
It more generally adds compatibility with any Doctrine manager, by allowing the user to give the Doctrine service name in the configuration (the default is kept to
doctrine).This is therefore more generic to the solution proposed in #136.
Here is an example: