Adds return/property/parameter types to a subset of the iterable types in Stdlib.
I've focussed on queues/stacks here to keep the patch small and easier to review. The intention is to work through other areas of the codebase and add type hints where appropriate in other patches, and update the migration guide with each patch.
This also fixes a bug in SplPriorityQueue where a serialisation round trip would cause unexpected insertion order due to the state of $this->serial not being updated during un-serialize.
Description
Adds return/property/parameter types to a subset of the iterable types in Stdlib.
I've focussed on queues/stacks here to keep the patch small and easier to review. The intention is to work through other areas of the codebase and add type hints where appropriate in other patches, and update the migration guide with each patch.
This also fixes a bug in
SplPriorityQueue
where a serialisation round trip would cause unexpected insertion order due to the state of$this->serial
not being updated during un-serialize.