As per @shirshir's comment, not every use case uses aggregates but the payload is always present...
Having TPayload as the first type information would be extremely valuable for advanced static analysis without forcing folks to always pass the TId.
Sample use: https://phpstan.org/r/12e2b0f9-4689-4694-a0b9-ba7f8facf689
This is technically a BC-break, though...
@frankdejonge @markinigor what are your thoughts on this?
As per @shirshir's comment, not every use case uses aggregates but the payload is always present...
Having
TPayloadas the first type information would be extremely valuable for advanced static analysis without forcing folks to always pass theTId.Sample use: https://phpstan.org/r/12e2b0f9-4689-4694-a0b9-ba7f8facf689
This is technically a BC-break, though...
@frankdejonge @markinigor what are your thoughts on this?