From cc9dfcabb53e16b6c65878731e899d82f7f6c454 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Mon, 7 Oct 2024 13:42:33 +0200 Subject: [PATCH] Closes #5872 --- ChangeLog-12.0.md | 4 ++++ phpunit.xsd | 2 +- src/TextUI/Configuration/Xml/DefaultConfiguration.php | 2 +- src/TextUI/Configuration/Xml/Loader.php | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog-12.0.md b/ChangeLog-12.0.md index 8237ee73a57..b99d0b985c5 100644 --- a/ChangeLog-12.0.md +++ b/ChangeLog-12.0.md @@ -4,6 +4,10 @@ All notable changes of the PHPUnit 12.0 release series are documented in this fi ## [12.0.0] - 2025-02-07 +### Changed + +* [#5872](https://github.com/sebastianbergmann/phpunit/issues/5872): The default value for `shortenArraysForExportThreshold` is now `10` (limit export of arrays to 10 levels) instead of `0` (do not limit export of arrays) + ### Removed * [#5215](https://github.com/sebastianbergmann/phpunit/issues/5215): `TestCase::iniSet()` diff --git a/phpunit.xsd b/phpunit.xsd index 5ac9fc60f0f..839b1c33768 100644 --- a/phpunit.xsd +++ b/phpunit.xsd @@ -218,7 +218,7 @@ - + diff --git a/src/TextUI/Configuration/Xml/DefaultConfiguration.php b/src/TextUI/Configuration/Xml/DefaultConfiguration.php index 221ac4a6929..45f5a0ea98b 100644 --- a/src/TextUI/Configuration/Xml/DefaultConfiguration.php +++ b/src/TextUI/Configuration/Xml/DefaultConfiguration.php @@ -152,7 +152,7 @@ public static function create(): self false, false, 100, - 0, + 10, ), TestSuiteCollection::fromArray([]), ); diff --git a/src/TextUI/Configuration/Xml/Loader.php b/src/TextUI/Configuration/Xml/Loader.php index b48e00ded42..eb8e4c96a34 100644 --- a/src/TextUI/Configuration/Xml/Loader.php +++ b/src/TextUI/Configuration/Xml/Loader.php @@ -864,7 +864,7 @@ private function phpunit(string $filename, DOMDocument $document): PHPUnit $beStrictAboutCoverageMetadata = $this->getBooleanAttribute($document->documentElement, 'beStrictAboutCoverageMetadata', false); } - $shortenArraysForExportThreshold = $this->getIntegerAttribute($document->documentElement, 'shortenArraysForExportThreshold', 0); + $shortenArraysForExportThreshold = $this->getIntegerAttribute($document->documentElement, 'shortenArraysForExportThreshold', 10); if ($shortenArraysForExportThreshold < 0) { $shortenArraysForExportThreshold = 0;