DoctrineExtensions
DoctrineExtensions copied to clipboard
[Sortable] Fix duplicated position when position for more than one object is changed manually
I discovered issue where if you edit 2 objects positions, relocation code changes second object position to be the same as existing record in db. I removed that relocation change and sorted in DESC order objects for update to make position updates correct
Codecov Report
Merging #2439 (a500374) into main (501f1a1) will increase coverage by
0.04%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #2439 +/- ##
============================================
+ Coverage 80.08% 80.12% +0.04%
+ Complexity 3140 3136 -4
============================================
Files 158 158
Lines 7702 7700 -2
============================================
+ Hits 6168 6170 +2
+ Misses 1534 1530 -4
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/Sortable/Mapping/Event/Adapter/ORM.php | 80.70% <100.00%> (ø) |
|
| src/Sortable/SortableListener.php | 96.66% <100.00%> (+1.62%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update e255785...a500374. Read the comment docs.
@januszmk You need to rebase onto the latest main to make the phpstan error go away and add a newline after SortableTest->testShouldShiftPositionForward() to fix the code style..
Hi, I stumbled upon the same bug. This PR seems to fix the bug. Is there anything blocking a merge?
thanks @januszmk!
Can you please tag new release @franmomu ?
v3.10.0 was released.
/cc @core23.