Commit Graph

106 Commits

Author SHA1 Message Date
Sebastian Bergmann 642e2bbda7
Introduce Exporter::hasCustomRepresentationFor() for checking whether an object exporter provides the representation for an object 2026-08-01 09:45:25 +02:00
Sebastian Bergmann 1ff285c572
Consult custom object exporter when exporting a value into a single-line string 2026-08-01 09:27:34 +02:00
Sebastian Bergmann 792150d027
Accept any object exporter, not just a chain, in Exporter's constructor 2026-08-01 09:11:45 +02:00
Sebastian Bergmann 067b4fde58
Ask custom object exporter for representation of enum before using default representation 2026-08-01 08:57:29 +02:00
Sebastian Bergmann b9ec7d93fe
Prevent duplicate array references and endless recursion when a custom object exporter exports nested values 2026-08-01 08:49:42 +02:00
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 4a11e3aea7
Add tests 2026-05-21 13:39:57 +02:00
Sebastian Bergmann c3c99d6629
Make binary string output readable for mostly-printable values 2026-05-20 08:16:59 +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 abc7f44aa8
Refactor 2026-01-01 09:52:33 +01:00
Sebastian Bergmann 968ad065d7
Remove skip condition that is no longer needed 2025-12-31 17:45:07 +01: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 9e7e86260d
Use SplObjectStorage::offsetSet() instead of deprecated SplObjectStorage::attach() 2025-09-22 07:25:48 +02:00
Sebastian Bergmann ebb3ef9d5a
Make configuration for maximum string length consistent with configuration for array shortening 2024-12-05 10:17:08 +01:00
Sebastian Bergmann bd2ef913f5
Assert that ReflectionClass::newLazyProxy() and ReflectionClass::isUninitializedLazyObject() are availble 2024-12-05 09:36:08 +01:00
Sebastian Bergmann 9497c5f6f6
Improve test name 2024-12-05 09:33:41 +01:00
Sebastian Bergmann 9e2aecd4b2
Fix version constraint 2024-12-05 09:30:56 +01:00
Nicolas PHILIPPE 83e92a68d8 fix: use ReflectionClass insteadof ReflectionObject 2024-12-05 09:22:36 +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 af8e0e4fc1
Narrow type 2024-06-22 09:52:00 +02:00
Sebastian Bergmann 0153a92389
Declare parameter types 2024-06-22 09:51:54 +02:00
Sebastian Bergmann 7ad871cb2d
Make sure we always return a string 2024-06-22 09:51:27 +02:00
Sebastian Bergmann 176f2adc28
Make sure that fopen() and mb_language() succeed 2024-06-22 09:48:16 +02:00
Sebastian Bergmann bf460d2605
Declare return type for data providers 2024-06-22 09:47:18 +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 043643c365
Update ChangeLog 2024-06-18 13:16:38 +02:00
Sebastian Bergmann 7eb922f18c
Closes #61 2024-06-18 08:31:36 +02:00
Markus Staab 085f6917da simplify 2024-06-18 07:53:22 +02:00
Markus Staab c28aa4bd1b count items recursively 2024-06-18 07:53:22 +02:00
Markus Staab ec1990caf8 cs 2024-06-18 07:53:22 +02:00
Markus Staab f0a267833b added test 2024-06-18 07:53:22 +02:00
Sebastian Bergmann a2f0736101
Prepare release
* When I created the 6.0.2 tag, I only ran the tests locally without code coverage
* When I pushed the 6.0.2 tag, the CI pipeline failed
* Upon seeing the CI pipeline, I deleted the 6.0.2 tag (within seconds after pushing it). I also deleted the 6.0.2 release on packagist.org
* As it turned out, the CI pipeline only failed because of bad code coverage metadata (after d0d99db563)
* In hindsight, pulling the release was an overreaction that should have been avoided
2024-06-17 09:52:43 +02:00
Sebastian Bergmann 0f06f75ff1
Fix code coverage metadata 2024-06-17 09:44:47 +02:00
Sebastian Bergmann d0d99db563
Revert #56 2024-06-17 09:39:18 +02:00
Sebastian Bergmann b9c7cad904
Merge branch '5.1' 2024-04-04 08:31:26 +02:00
Sebastian Bergmann fa244dedb8
Add tests 2024-04-04 08:20:43 +02:00
Sebastian Bergmann 6d31e7fadc
Tweak data set name 2024-04-04 08:08:38 +02:00
Sebastian Bergmann 54d89d31b3
Test with indentation 2024-03-31 10:05:26 +02:00
Sebastian Bergmann faa8abd384
Declare parameter types 2024-03-31 09:04:55 +02:00
Sebastian Bergmann f6bc492db0
Make export of objects customizable 2024-03-31 08:51:37 +02:00
Sebastian Bergmann 58c3825286
Refactor 2024-03-31 08:20:24 +02:00
Sebastian Bergmann 13ed8a0a39
Rename data sets 2024-03-31 08:15:21 +02:00
Sebastian Bergmann a7c4e3642a
Do not use dynamic property 2024-03-29 07:24:50 +01:00
Gabriel Ostrolucký caa31540c3 Modernize array syntax 2023-09-18 08:39:36 +02:00
Sebastian Bergmann b2d7136397
Mark tests as small 2023-09-08 06:35:21 +02:00