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

feat: "in memory" behavior #590

Draft
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

nikophil
Copy link
Member

@nikophil nikophil commented Apr 9, 2024

⚠️ this PR is built on top of #648

This PR introduces "in-memory" behavior

fixes #533

NB: In a follow up PR, I'll introduce InMemoryRepositoryDecorator, so it will be easier to make assertions

@nikophil nikophil changed the base branch from 1.x to 2.x April 9, 2024 07:07
@nikophil nikophil force-pushed the feat/in-memory-behavior branch 3 times, most recently from 4add46a to 57bbc01 Compare May 1, 2024 18:55
Comment on lines 114 to 134
public function enableInMemory(): void
{
$this->inMemory = true;
}

public function isInMemoryEnabled(): bool
{
return $this->inMemory;
}
Copy link
Member Author

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

@nikophil nikophil force-pushed the feat/in-memory-behavior branch 12 times, most recently from 56a501b to 558fc5f Compare August 19, 2024 18:04
@nikophil nikophil changed the title feat/in memory behavior feat: "in memory" behavior Aug 19, 2024
src/Configuration.php Outdated Show resolved Hide resolved
@nikophil nikophil force-pushed the feat/in-memory-behavior branch 3 times, most recently from 5e8a734 to 90502f7 Compare October 25, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

support "in-memory" repositories
2 participants