You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of the older releases, generics were added for the PriorityQueue.
I've updated to that and also got psalm bitching about SplPriorityQueue.
Now, since I want to fix both issues, I have to adapt different styles.
Current behavior
Generics for PriorityQueue needs to be written like:
PriorityQueue<TValue,TPriority>
Generics for SplPriorityQueue needs to be written like: SplPriorityQueue<TPriority,TValue>
The latter feels more convenient, as its also aligned with arrays and keys. Since the priority queue is some kind of "array" as well, thats more inconvenient if I have to annotate the value as the key and the key as a value within the generic annotation in PriorityQueue implemetation.
Bug Report
Summary
In one of the older releases, generics were added for the
PriorityQueue
.I've updated to that and also got psalm bitching about
SplPriorityQueue
.Now, since I want to fix both issues, I have to adapt different styles.
Current behavior
Generics for
PriorityQueue
needs to be written like:PriorityQueue<TValue,TPriority>
Generics for
SplPriorityQueue
needs to be written like:SplPriorityQueue<TPriority,TValue>
The latter feels more convenient, as its also aligned with arrays and keys. Since the priority queue is some kind of "array" as well, thats more inconvenient if I have to annotate the value as the key and the key as a value within the generic annotation in
PriorityQueue
implemetation.How to reproduce
Expected behavior
The text was updated successfully, but these errors were encountered: