Skip to content

Commit 1b6861f

Browse files
committed
feature #784 Sort doctrine entities for autocomplete (zorn-v)
This PR was squashed before being merged into the 1.0-dev branch. Discussion ---------- Sort doctrine entities for autocomplete It make autocomplete more predictable and much better in some cases. For example I have entities `Invoice` and `InvoiceTransaction`, with sort first suggestion will be `Invoice` but now it can be `InvoiceTransaction` and you must press `TAB` and `BACKSPACE` several times to edit `Invoice` entity. ![изображение](https://user-images.githubusercontent.com/12619075/104320651-54883000-552e-11eb-89eb-f66b7e34182f.png) Commits ------- 8c01de2 Sort doctrine entities for autocomplete
2 parents 0f4d4eb + 8c01de2 commit 1b6861f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Doctrine/DoctrineHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ public function getEntitiesForAutocomplete(): array
124124
}
125125
}
126126

127+
sort($entities);
128+
127129
return $entities;
128130
}
129131

0 commit comments

Comments
 (0)