Commit Graph

155 Commits

Author SHA1 Message Date
Sebastian Bergmann 5f9dc382bf
Ask custom object exporter for representation before consulting recursion context 2026-07-30 07:56:57 +02:00
Sebastian Bergmann 3f33ba4c67
Introduce ObjectExporter interface and ObjectExporterChain for customizing how objects are exported 2026-07-13 13:48:57 +02:00
Sebastian Bergmann b54c4ddf23
Treat lone LF followed by lone CR as two separate line endings 2026-05-23 06:27:19 +02:00
Sebastian Bergmann c3c99d6629
Make binary string output readable for mostly-printable values 2026-05-20 08:16:59 +02:00
Sebastian Bergmann 41cdd17bf0
Closes #57 2026-05-20 07:48:57 +02:00
Sebastian Bergmann 3825c739b1
Merge branch '7.0'
* 7.0:
  Closes #90
  Update github-actions
  Update codecov/codecov-action digest to e79a696
  Update dependency phpstan/phpstan to ^2.1.55
2026-05-20 06:35:46 +02:00
Sebastian Bergmann d5f1896389
Closes #90 2026-05-20 06:34:14 +02:00
USAMI Kenta 4d141ea52d Avoid int casts when exporting floats
Avoid runtime warnings for large float values by removing the
int-cast-based check and using a simpler string-based check instead.
2026-04-15 14:35:39 +02:00
Sebastian Bergmann 3367e85396
Explicitly handle NAN, INF, and -INF 2026-04-10 14:32:24 +02:00
Sebastian Bergmann abc7f44aa8
Refactor 2026-01-01 09:52:33 +01:00
Sebastian Bergmann 6eefe702f2
Merge branch '6.3'
* 6.3:
  Prepare release
  Prepare release
  Prepare release
  Suppress warning
  Suppress warning
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
2025-09-24 08:15:29 +02:00
Sebastian Bergmann 3118f38910
Merge branch '5.1' into 6.3
* 5.1:
  Prepare release
  Prepare release
  Suppress warning
  Suppress warning
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
2025-09-24 08:12:48 +02:00
Sebastian Bergmann 581d50f9f2
Merge branch '4.0' into 5.1
* 4.0:
  Prepare release
  Suppress warning
  Suppress warning
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
2025-09-24 08:08:53 +02:00
Sebastian Bergmann 029c8ee97a
Merge branch '3.1' into 4.0
* 3.1:
  Suppress warning
  Suppress warning
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
2025-09-24 08:03:00 +02:00
Sebastian Bergmann 64cfeaa341
Suppress warning 2025-09-24 07:55:14 +02:00
Sebastian Bergmann 5c10a78583
Merge branch '6.3'
* 6.3:
  Prepare release
  Ignore error
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
  Suppress warning
  Update tools
  Prepare release
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
  Suppress warning
  Prepare release
  Test with more versions
  Do not cache Composer dependencies
  Suppress warning
  Do not use implicitly nullable parameters and prepare release
  Do not use implicitly nullable parameters and prepare release
2025-09-22 07:36:56 +02:00
Sebastian Bergmann d42067da54
Ignore error 2025-09-22 07:33:55 +02:00
Sebastian Bergmann 6852dba6c8
Merge branch '5.1' into 6.3
* 5.1:
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
  Suppress warning
  Update tools
  Prepare release
  Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach()
  Suppress warning
  Prepare release
  Test with more versions
  Do not cache Composer dependencies
  Suppress warning
  Do not use implicitly nullable parameters and prepare release
  Do not use implicitly nullable parameters and prepare release
2025-09-22 07:32:07 +02:00
Sebastian Bergmann b374fad5ff
Suppress warning 2025-09-22 07:25:21 +02:00
Sebastian Bergmann 5fc7be9ead
Merge branch '3.1' into 4.0
* 3.1:
  Prepare release
  Test with more versions
  Do not cache Composer dependencies
  Suppress warning
  Do not use implicitly nullable parameters and prepare release
2025-09-22 07:05:13 +02:00
Sebastian Bergmann 06e217b8bf
Suppress warning 2025-09-22 06:56:30 +02:00
Sebastian Bergmann cb499f5074
Ignore cast.useless error 2025-03-17 17:17:26 +01:00
Sebastian Bergmann a3bb1f01c1
Assert that the element exists 2025-03-17 17:17:26 +01:00
Sebastian Bergmann 515a304e30
Use stricter comparison 2025-03-17 17:17:26 +01:00
Sebastian Bergmann ebb3ef9d5a
Make configuration for maximum string length consistent with configuration for array shortening 2024-12-05 10:17:08 +01:00
Nicolas PHILIPPE 83e92a68d8 fix: use ReflectionClass insteadof ReflectionObject 2024-12-05 09:22:36 +01:00
Sebastian Bergmann ddf15797e9
Increase PHPStan rule level to 10 2024-11-17 13:48:57 +01:00
Sebastian Bergmann 60f5099d67
We need to accept $maxLengthForStrings for shortenedRecursiveExport() and pass it to shortenedExport() from there 2024-10-20 07:03:41 +02:00
Sebastian Bergmann bba3ca3cdc
Closes #67
Co-authored-by: Sebastian Bergmann <sb@sebastian-bergmann.de>
Co-authored-by: Fabian Blechschmidt <github@fabian-blechschmidt.de>
Co-authored-by: Arne Blankerts <arne@blankerts.de>
Co-authored-by: Markus Staab <markus.staab@redaxo.de>
Co-authored-by: Nicola Pilcher <nicola.pilcher@gmail.com>
Co-authored-by: Andreas Möller <am@localheinz.com>
Co-authored-by: Sebastian Heuer <sebastian@phpeople.de>
2024-10-19 12:07:33 +02:00
Sebastian Bergmann e78e729e97
Ignore error reported by PHPStan 2024-06-22 09:36:34 +02:00
Sebastian Bergmann d7f10b24f3
Make it explicit that we are dealing with arrays that contain mixed values 2024-06-22 09:36:18 +02:00
Sebastian Bergmann 2078f1dd0c
Use PHPStan instead of Psalm 2024-06-22 09:22:34 +02:00
Sebastian Bergmann 2dce761b61
Refactor 2024-06-21 10:38:47 +02:00
Sebastian Bergmann 119dedae41
Ignore code paths from code coverage that are only executed in edge cases 2024-06-21 07:20:48 +02:00
Sebastian Bergmann c773e4e3ef
Refactor 2024-06-21 07:18:28 +02:00
Brett McBride 1e4815983a
avoid using Reflection for some classes
if a class has problems with Reflection, then fall back to the old toArray
method of counting its properties. For example, using reflection on an ext-protobuf
Message causes a segfault
2024-06-21 07:13:31 +02:00
Markus Staab 09fec25b79 Prevent unnecessary calls to `str_repeat()` 2024-06-18 13:18:01 +02:00
Markus Staab 8474a9eeef Faster `Exporter-> exportString()` 2024-06-18 13:17:37 +02:00
Sebastian Bergmann 043643c365
Update ChangeLog 2024-06-18 13:16:38 +02:00
Sebastian Bergmann 7eb922f18c
Closes #61 2024-06-18 08:31:36 +02:00
Sebastian Bergmann be167d0eb5
Import constant 2024-06-18 08:06:22 +02:00
Sebastian Bergmann ccd8dc8214
Fix CS/WS issues 2024-06-18 08:05:44 +02:00
Sebastian Bergmann d04fbb0ae5
Narrow types 2024-06-18 08:01:21 +02:00
Sebastian Bergmann b04e1d6a3f
Fix CS/WS issues 2024-06-18 08:01:15 +02:00
Markus Staab 085f6917da simplify 2024-06-18 07:53:22 +02:00
Markus Staab f5ba9b0010 better method name 2024-06-18 07:53:22 +02:00
Markus Staab c28aa4bd1b count items recursively 2024-06-18 07:53:22 +02:00
Markus Staab 62e4121f1e turn limit into property 2024-06-18 07:53:22 +02:00
Markus Staab d905fc3460 fix typo 2024-06-18 07:53:22 +02:00
Markus Staab ec1990caf8 cs 2024-06-18 07:53:22 +02:00