-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow multiple entities with closure strategy #2653
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2653 +/- ##
==========================================
- Coverage 79.67% 79.37% -0.30%
==========================================
Files 161 162 +1
Lines 8453 8471 +18
==========================================
- Hits 6735 6724 -11
- Misses 1718 1747 +29 ☔ View full report in Codecov by Sentry. |
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.
Given the tied implementation we have around spl_object_id()
for array keys, I think we could extract that logic to a private method instead of manually building these keys each time.
BTW, please, don't forget to add a changelog note.
I went ahead and added a changelog note. Let me know if I did it correctly. If you can provide specific instructions on what other refactoring you'd like to see, I could try to add that to this PR, but I wonder if that would be better to put in a separate update. |
It is correct, thank you.
I agree, let's make this change in a separate PR. |
I'm still having issues, even after this fix. I've added one more commit to simplify the code further and ensure that closures are never added until the node has been persisted. I think the issue is solved now, but let me know if anything else needs to be done on my end. |
I'm not sure if the rebase needs to be done by me, or someone else will do that. If it's me, I will need some instructions as I've never done this before. |
You should execute this command: git pull --rebase upstream main (where Then, you must manually resolve the conflicts presented by git, add the modified files to the staging area ( git push origin main -f |
I've completed the rebase. Hopefully everything is correct, but let me know if anything else needs to be done related to that. Thanks. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any movement on this pull request? Anything still needed to merge this? |
IMO, this only requires a rebase currently. |
Thanks for reviewing that, I went ahead and did a rebase. |
composer.json
Outdated
@@ -40,7 +40,7 @@ | |||
"wiki": "https://github.com/Atlantic18/DoctrineExtensions/tree/main/doc" | |||
}, | |||
"require": { | |||
"php": "^7.4 || ^8.0", | |||
"php": "^7.2 || ^8.0", |
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.
This seems a regression.
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.
Thanks for pointing that out, I mistakenly resolved the conflict in the wrong direction. I've updated the version to 7.4
composer.json
Outdated
"symfony/phpunit-bridge": "^6.0 || ^7.0", | ||
"symfony/uid": "^5.4 || ^6.0 || ^7.0", | ||
"symfony/yaml": "^5.4 || ^6.0 || ^7.0" | ||
"doctrine/orm": "^2.14.0", |
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.
Please, check the whole file. Many of these changes seem like a regression.
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.
Thanks for your patience, this is my first time contributing to a large project. I've gone through the whole file and updated all packages to match the current versions.
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.
Thanks for taking the time to iterate and fix, JDruery!
Fixes #2652. I added one test that does not pass and then modified the Closure.php strategy file to handle this case (persisting two types of entities, both with closure trees, and then flushing).