doctrine-extensions / DoctrineExtensions

Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable
MIT License
4.01k stars 1.26k forks source link

[Tree] Allow multiple order critieria in reorder and reorderAll #2744

Open Waigie opened 5 months ago

Waigie commented 5 months ago

The functions \Gedmo\Tree\Entity\Repository\NestedTreeRepository::reorder and \Gedmo\Tree\Entity\Repository\NestedTreeRepository::reorderAll both take the parameters $sortByField and $direction with the type ?string. By allowing string arrays as well, the functions allow reordering with multiple order criteria (e.g. sort by category and date).

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (66e6a60) 79.33% compared to head (8a7ced8) 79.26%.

:exclamation: Current head 8a7ced8 differs from pull request most recent head 253b195. Consider uploading reports for the commit 253b195 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2744 +/- ## ========================================== - Coverage 79.33% 79.26% -0.07% ========================================== Files 162 162 Lines 8506 8513 +7 ========================================== Hits 6748 6748 - Misses 1758 1765 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Waigie commented 5 months ago

Merged the upstream changes, problems should be fixed