Closed gsteel closed 2 years ago
Not sure if this should target 3.12.1 or 3.13.0 ?
@gsteel if this is a bugfix, 3.12.x
IMO.
This would possibly break upstream projects which already spent time in fixing their code.
Yes, this looks correct to me but technically, it was not incorrect before. Do we really want introduce this in a Patch?
ah this is only released for a few hours, maybe we can Patch it 👌🏻
Generics were introduced and released in #58 and #59 back in June
Oh, thats been a while. Not sure if we should annoy upstream devs who spent time to fix their static analysis. Do we have other thoughts?
Not sure if we should annoy upstream devs who spent time to fix their static analysis
I guess it depends whether we consider the original template order a bug or not - IMO it's a bug - aligning with PHP's SplPriorityQueue and psalms stubs should be a given. Not annoying devs with this is really valid, but the longer it's left, the more people we annoy?
This will already affect one or two laminas packages I think… view, maybe validator, possibly others. My bad! Sorry…
Oh, thats been a while. Not sure if we should annoy upstream devs who spent time to fix their static analysis. Do we have other thoughts?
It's also possible, if this is a bug, that devs who already implemented correct static analysis have been annoyed by this break, so would appreciate this fix.
Discussed in chat: clarifying template types is OK, but swapping order will likely just lead to unnecessary downstream breakages.
Yes, it is annoying that the generic types are inverted in our implementation, but it is just that: annoying. Not a major deal breaker.
Reference #71
Previously implemented template order did not match those of native SplPriorityQueue, i.e. \SplPriorityQueue<TPriority, TValue> - instead the templates were back-to-front.
It's decided that 'fixing' the order of the placeholders will be inconvenient for users that have already implemented templates with the existing order.
T
toTValue