Skip to content

feat: implement caching for PostgreSQL #330

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

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

Conversation

slutsky
Copy link

@slutsky slutsky commented Mar 6, 2025

@slutsky slutsky force-pushed the feature/postgresql-cache branch from fb394cc to 85e1414 Compare March 19, 2025 16:29
@slutsky
Copy link
Author

slutsky commented Mar 19, 2025

The append functionality works wrong. The ConfigMysqlTest::testAppendFixtures() creates bad cache that broke next tests. I created issue #331 with bug. It's not my fault, so I marked the ConfigMysqlTest::testAppendFixtures() as skipped.

@slutsky slutsky force-pushed the feature/postgresql-cache branch from 85e1414 to d254650 Compare March 19, 2025 16:48
@@ -98,6 +98,8 @@ public function loadFixtures(array $classNames = [], bool $append = false): Abst

return $executor;
}

$this->om->clear();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? It looks unrelated to the feature of this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. But I wanted the tests to work correctly. When I was writing tests for PostgreSQL, I found this change fix the ConfigPgsqlCacheDbTest::testLoadFixturesCheckReferences test and the ConfigMysqlCacheDbTest::testLoadFixturesCheckReferences test. I think this is the correct behavior when we reload fixtures without the append flag. Should I make the separated pull request for this changes?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please split the changes unrelated to PgSQL in another PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fix bug from issue #331 in the PR #332. When I fix it the error from the ConfigMysqlCacheDbTest::testLoadFixturesCheckReferences test is gone. I think I don't need the extra $this->om->clear() in the loadFixtures method anymore. I will update this branch when PR #332 is be merged.

@slutsky slutsky force-pushed the feature/postgresql-cache branch from d254650 to f302768 Compare May 27, 2025 21:48
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.

2 participants