Skip to content

[5.1] fix: Do no sort listeners differently depending on their type - #169

Merged
phil-davis merged 2 commits into
sabre-io:5.1from
phil-davis:fix/sort-array-and-closure-the-same-5.1
Jul 7, 2026
Merged

[5.1] fix: Do no sort listeners differently depending on their type#169
phil-davis merged 2 commits into
sabre-io:5.1from
phil-davis:fix/sort-array-and-closure-the-same-5.1

Conversation

@phil-davis

Copy link
Copy Markdown
Contributor

With array_multisort, when priority is the same it would fallback to
comparing values, and PHP will sort Closures after array callables.
This is not something we want as it means turning an array callable into
a Closure would potentially change its order, leading to unexpected
side-effects.

Backport #162 to 5.1 branch.

With array_multisort, when priority is the same it would fallback to
 comparing values, and PHP will sort Closures after array callables.
This is not something we want as it means turning an array callable into
 a Closure would potentially change its order, leading to unexpected
 side-effects.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@phil-davis phil-davis changed the title fix: Do no sort listeners differently depending on their type [5.1] fix: Do no sort listeners differently depending on their type Jul 7, 2026
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.45%. Comparing base (930e42f) to head (5cd7d4d).
⚠️ Report is 4 commits behind head on 5.1.

Additional details and impacted files
@@             Coverage Diff              @@
##                5.1     #169      +/-   ##
============================================
- Coverage     99.45%   99.45%   -0.01%     
  Complexity      119      119              
============================================
  Files             7        7              
  Lines           367      366       -1     
============================================
- Hits            365      364       -1     
  Misses            2        2              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@phil-davis
phil-davis merged commit 8dbccde into sabre-io:5.1 Jul 7, 2026
10 checks passed
@phil-davis
phil-davis deleted the fix/sort-array-and-closure-the-same-5.1 branch July 7, 2026 09:06
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