-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Fix create snapshots #1548
Fix create snapshots #1548
Conversation
Do you see an easy functional test to add ? |
Not sure, my functional test for createsnapshotcommand didn't catch this bug. Maybe a functional test if it is possible to create snapshots from the sonata admin interface. |
Wait it's the same problem for cleanup snapshot: f8022f6#diff-112198c8b3816a6af7235c0c526ba39544d633700e4538d9ab1fc7e7c770d8f6R38 maybe we should revert the changed made there: #1536 |
NOpe, the problem is not the if, is the second condition changed from commit to beginTransaction, because I copy pasted. I double checked the other file, and I didn't make this error there. |
Other thing I guess we should create a test to see if beginTransaction and commit are called
this way we could remove the couple from Doctrine methods and let the manager handle this! in the end I'm proposing to follow the demeter law |
True, it's using commit, then it could be other issue! ok good |
in theory we should add here: or Add a new interface like
|
You're kinda creating coupling then. It would be better to create a new interface here: https://github.com/sonata-project/sonata-doctrine-extensions/tree/2.x/src/Model Which would be Do you want to do the PR @eerison ? |
yeah it's the second option that I suggested 😄 But Yeah I can open a PR with Create small interface are better! you are right ;) |
But that change is independent from this fix right? |
well I can open a new PR improving this, and creating for test it! |
Let's merge this so far |
Subject
Broken only on 4.x due an update of phpstan with this copy paste typo.