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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/in memory behavior #590
base: 2.x
Are you sure you want to change the base?
Conversation
3e88d34
to
f7be7ac
Compare
4add46a
to
57bbc01
Compare
/** | ||
* @var array<class-string<T>, GenericInMemoryRepository<T>> | ||
*/ | ||
private array $genericInMemoryRepositories = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those should not be stored here... I think I'll introduce a InMemoryRepositroyRegistry
*/ | ||
function enable_in_memory(): void | ||
{ | ||
Configuration::instance()->enableInMemory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first, I did something like:
Configuration::instance()->persistence()->enableInMemory();
and the $inMemory
boolean was stored in PersistenceManager
. But then, all InMemoryTest
did not worked when no persistence is activated, which is a non-sense 馃し
Then I decided to store this in the Configuration
class
57bbc01
to
f6684d2
Compare
f6684d2
to
7914ee1
Compare
Here is a first draft for "in memory" behavior
see #533
This still needs a bit of polish, and some thinking on how is the best way to achieve this 馃槃
NB: In a follow up PR, I'll introduce
InMemoryRepositoryDecorator
, so it will be easier to make assertions