Closes #57
This commit is contained in:
parent
08b965bdef
commit
41cdd17bf0
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [8.0.4] - 2026-MM-DD
|
||||
|
||||
### Changed
|
||||
|
||||
* [#57](https://github.com/sebastianbergmann/exporter/issues/57): Preserve `SplObjectStorage` iterator position instead of resetting to first element
|
||||
|
||||
## [8.0.3] - 2026-05-20
|
||||
|
||||
### Fixed
|
||||
|
|
@ -48,6 +54,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
|
|||
|
||||
* This component is no longer supported on PHP 8.2
|
||||
|
||||
[8.0.4]: https://github.com/sebastianbergmann/exporter/compare/8.0.3...main
|
||||
[8.0.3]: https://github.com/sebastianbergmann/exporter/compare/8.0.2...8.0.3
|
||||
[8.0.2]: https://github.com/sebastianbergmann/exporter/compare/8.0.1...8.0.2
|
||||
[8.0.1]: https://github.com/sebastianbergmann/exporter/compare/8.0.0...8.0.1
|
||||
|
|
|
|||
|
|
@ -230,6 +230,12 @@ final readonly class Exporter
|
|||
// above (fast) mechanism nor with reflection in Zend.
|
||||
// Format the output similarly to print_r() in this case
|
||||
if ($value instanceof SplObjectStorage) {
|
||||
$key = null;
|
||||
|
||||
if ($value->valid()) {
|
||||
$key = $value->key();
|
||||
}
|
||||
|
||||
foreach ($value as $_value) {
|
||||
$array['Object #' . spl_object_id($_value)] = [
|
||||
'obj' => $_value,
|
||||
|
|
@ -237,7 +243,9 @@ final readonly class Exporter
|
|||
];
|
||||
}
|
||||
|
||||
$value->rewind();
|
||||
if ($key !== null) {
|
||||
$value->seek($key);
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
|
|
|
|||
Loading…
Reference in New Issue