chore(deps): update dependency phpunit/phpunit to v13 #10
No reviewers
Labels
No labels
bug
dependencies
docker
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
php
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jorijn/bitcoin-dca!10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/phpunit-phpunit-13.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
^10.0→^13.0Release Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v13.1.8: PHPUnit 13.1.8Compare Source
Fixed
testStartedandtestFinishedassertArrays*IgnoringOrder()fails on mixed scalar types and on reordered nested associative arraysMockBuilder::setMockClassName()andTestStubBuilder::setStubClassName()now reject values that are not valid unqualified PHP class identifiers, throwing the newInvalidClassNameExceptionGenerator::ensureValidMethods()to validate method names passed toMockBuilder::onlyMethods()andaddMethods()was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was acceptedLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.7: PHPUnit 13.1.7Compare Source
Changed
LIBXML_NONETwhen parsing/validating XML configuration files to make explicit that no network I/O is performedLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.6: PHPUnit 13.1.6Compare Source
Fixed
;and"are not preserved when forwarding settings to child processesLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.5: PHPUnit 13.1.5Compare Source
Fixed
-dsettings are not forwarded to child processes for process isolationRequiresPhp(e.g.<=8.5) is compared against full PHP version, causing unexpected skipsdataSetAsStringWithData()raises "float is not representable as int" warning for large floats in data setsLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.4: PHPUnit 13.1.4Compare Source
Fixed
DefaultJobRunnerdeadlocks on child processes that write large amounts of stderr output$_SERVERentries leak from parent into child processfailOnEmptyTestSuite="false"inphpunit.xmlis ignored when--group/--filter/--testsuitematches no testsLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.3: PHPUnit 13.1.3Compare Source
Fixed
Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.2: PHPUnit 13.1.2Compare Source
Fixed
--random-order-seedis used when test execution order is not random--filterdoes not work when filter string starts with#TestSuiteSkippedevent--filter,--group,--testsuite) yields no teststearDown()and handler restoration, causing subsequent tests to be marked as riskyLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.1: PHPUnit 13.1.1Compare Source
Changed
exitwas called from some testFixed
colors="true"in XML configuration file does not unconditionally enable colored output--migrate-configurationdoes not update schema location when XML content already validates against current schemawillReturnCallback()is silently swallowed when code under test catches exceptionsset_include_path()TestDoubleBuildermethod chainingLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.0: PHPUnit 13.1.0Compare Source
Added
includeInCodeCoverageattribute for<directory>and<file>children of<source>#[Group]information in Open Test Reporting (OTR) XML logfile#[DataProviderClosure]for static closures<issueTriggerResolvers>in the XML configuration file%r...%rinEXPECTFsectionoutputDirectoryattribute, allowing the output directory to be specified later with the--coverage-htmlCLI optionChanged
StringMatchesFormatDescriptionconstraint which is used byassertFileMatchesFormat(),assertFileMatchesFormatFile(),assertStringMatchesFormat(),assertStringMatchesFormatFile(), andEXPECTFsections of PHPT test filesPHPUnit\Runner\Extension\Facadefrom a concrete class to an interface and introduced an internalExtensionFacadeimplementation, so that extensions only depend on theFacadeinterface while PHPUnit internally uses theExtensionFacadeclass that also provides query methodsDeprecated
--log-events-verbose-text <file>CLI optionid()andafter()for mock object expectationsFixed
FILE_EXTERNALbreaks__DIR__TestSuiteLoaderis brittle and causes "Class FooTest not found" even for valid tests in valid filenamesLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.0.6: PHPUnit 13.0.6Compare Source
Changed
Fixed
RegularExpressionandStringMatchesFormatDescriptiondid not handlepreg_match()errors such asCompilation failed: regular expression is too largeLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.5: PHPUnit 13.0.5Compare Source
Fixed
Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.4: PHPUnit 13.0.4Compare Source
Fixed
Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.3: PHPUnit 13.0.3Compare Source
Fixed
<ini />can silently failLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.2: PHPUnit 13.0.2Compare Source
Deprecated
atLeast()with an argument that is not positivewith*()withoutexpects()Fixed
SourceMappermay be deleted prematurely when multiple PHPUnit processes run in parallelwith()is used withoutexpects()Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.1: PHPUnit 13.0.1Compare Source
Fixed
method()returnsInvocationMockerinstead ofInvocationStubberfor test stubsLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.0: PHPUnit 13.0.0Compare Source
Added
TestCase::invokeTestMethod()method for customizing test method invocationwithParameterSetsInOrder()andwithParameterSetsInAnyOrder()for expecting calls to the same method of a mock object but with different argumentsassertArraysAreIdentical(),assertArraysAreIdenticalIgnoringOrder(),assertArraysHaveIdenticalValues(),assertArraysHaveIdenticalValuesIgnoringOrder(),assertArraysAreEqual(),assertArraysAreEqualIgnoringOrder(),assertArraysHaveEqualValues(), andassertArraysHaveEqualValuesIgnoringOrder()assertions--test-files-file <file>CLI option to configure a file that contains the paths to the test files to be loaded (one file per line); use this when using CLI arguments is not an option due to argument length limitationsDeprecated
any()matcher (hard deprecation)Removed
Assert::isType()assertContainsOnly()andassertNotContainsOnly()containsOnly()testClassName()method on event value objects for hook methods called for test methodsConfiguration::includeTestSuite()andConfiguration::excludeTestSuite()--dont-report-useless-testsCLI option#[CoversNothing]on a test method#[RunClassInSeparateProcess]attributeLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v12.5.24: PHPUnit 12.5.24Compare Source
Added
TestCase::invokeTestMethod()method for customizing test method invocation from PHPUnit 13Fixed
testStartedandtestFinishedMockBuilder::setMockClassName()andTestStubBuilder::setStubClassName()now reject values that are not valid unqualified PHP class identifiers, throwing the newInvalidClassNameExceptionGenerator::ensureValidMethods()to validate method names passed toMockBuilder::onlyMethods()andaddMethods()was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was acceptedLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.23: PHPUnit 12.5.23Compare Source
Changed
LIBXML_NONETwhen parsing/validating XML configuration files to make explicit that no network I/O is performedLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.22: PHPUnit 12.5.22Compare Source
Fixed
;and"are not preserved when forwarding settings to child processesLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.21: PHPUnit 12.5.21Compare Source
Fixed
-dsettings are not forwarded to child processes for process isolationRequiresPhp(e.g.<=8.5) is compared against full PHP version, causing unexpected skipsLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.20: PHPUnit 12.5.20Compare Source
Fixed
DefaultJobRunnerdeadlocks on child processes that write large amounts of stderr output$_SERVERentries leak from parent into child processfailOnEmptyTestSuite="false"inphpunit.xmlis ignored when--group/--filter/--testsuitematches no testsLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.19: PHPUnit 12.5.19Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.18: PHPUnit 12.5.18Compare Source
Fixed
--random-order-seedis used when test execution order is not random--filterdoes not work when filter string starts with#TestSuiteSkippedevent--filter,--group,--testsuite) yields no teststearDown()and handler restoration, causing subsequent tests to be marked as riskyLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.17: PHPUnit 12.5.17Compare Source
Changed
exitwas called from some testFixed
colors="true"in XML configuration file does not unconditionally enable colored output--migrate-configurationdoes not update schema location when XML content already validates against current schemawillReturnCallback()is silently swallowed when code under test catches exceptionsset_include_path()TestDoubleBuildermethod chainingLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.16: PHPUnit 12.5.16Compare Source
Added
%r...%rinEXPECTFsectionFixed
FILE_EXTERNALbreaks__DIR__TestSuiteLoaderis brittle and causes "Class FooTest not found" even for valid tests in valid filenamesLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.15: PHPUnit 12.5.15Compare Source
Changed
Fixed
RegularExpressionandStringMatchesFormatDescriptiondid not handlepreg_match()errors such asCompilation failed: regular expression is too largeLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.14: PHPUnit 12.5.14Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.13: PHPUnit 12.5.13Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.12: PHPUnit 12.5.12Compare Source
Fixed
<ini />can silently failLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.11: PHPUnit 12.5.11Compare Source
Deprecated
with*()on test stubsFixed
SourceMappermay be deleted prematurely when multiple PHPUnit processes run in parallelwith()is used withoutexpects()Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.10: PHPUnit 12.5.10Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.9: PHPUnit 12.5.9Compare Source
Added
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.8: PHPUnit 12.5.8Compare Source
Changed
.coveragefiles in pull requests, a PHPT test will no longer be run if the temporary file for writing code coverage information already exists before the test runsLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.7: PHPUnit 12.5.7Compare Source
Fixed
Count::getCountOf()for unusal implementations ofIteratororIteratorAggregateLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.6: PHPUnit 12.5.6Compare Source
Changed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.5: PHPUnit 12.5.5Compare Source
Deprecated
any()matcher (soft deprecation)Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.4: PHPUnit 12.5.4Compare Source
Changed
#[AllowMockObjectsWithoutExpectations]attribute can now be used on the method levelFixed
Timer::start() has to be called before Timer::stop()Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.3: PHPUnit 12.5.3Compare Source
Changed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.2: PHPUnit 12.5.2Compare Source
Added
#[AllowMockObjectsWithoutExpectations]for excluding tests from the check that emits the notice for test methods that create a mock object but do not configure an expectation for itLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.1: PHPUnit 12.5.1Compare Source
Added
TestCase::getStubBuilder()(analogous toTestCase::getMockBuilder()) for creating (partial) test stubs using a fluent APILearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.0: PHPUnit 12.5.0Compare Source
Added
--allCLI option to ignore test selection configured in XML configuration file<source>element in XML code coverage report optionalChanged
ThrowableinexpectExceptionObject()Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.4.5: PHPUnit 12.4.5Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.4: PHPUnit 12.4.4Compare Source
Fixed
Learn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.3: PHPUnit 12.4.3Compare Source
Fixed
STDOUTwhenrewind()failsLearn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.2: PHPUnit 12.4.2Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.1: PHPUnit 12.4.1Compare Source
Fixed
--filterformat used by PhpStorm stopped workingDataProviderMethodCalledevent value objectLearn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.0: PHPUnit 12.4.0Compare Source
Added
#[IgnoreDeprecations]attributeDeprecated
#[RunClassInSeparateProcess]attributeLearn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.3.15: PHPUnit 12.3.15Compare Source
Fixed
failOnPhpunitWarning="false"has no effectLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.14: PHPUnit 12.3.14Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.13: PHPUnit 12.3.13Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.12: PHPUnit 12.3.12Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.11: PHPUnit 12.3.11Compare Source
Changed
__sleep()and__wakeup()from test double code generation on PHP >= 8.5Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.10: PHPUnit 12.3.10Compare Source
Changed
E_DEPRECATEDissues when building the test suiteLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.9: PHPUnit 12.3.9Compare Source
Changed
__sleep()method (which will be deprecated in PHP 8.5)Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.8: PHPUnit 12.3.8Compare Source
Fixed
Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.7: PHPUnit 12.3.7Compare Source
Changed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.6Compare Source
v12.3.5: PHPUnit 12.3.5Compare Source
Changed
error_reporting=E_ALLfor--check-php-configurationFixed
expectUserDeprecationMessage*()fails when test is run in separate processLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.4: PHPUnit 12.3.4Compare Source
Changed
--check-php-configurationFixed
ini_set('error_log')sets filepath outsideopen_basedirLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.3: PHPUnit 12.3.3Compare Source
Fixed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations" from PHPUnit 12.3.1)Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.2: PHPUnit 12.3.2Compare Source
Changed
testSplObjectStoragemethods that will be deprecated in PHP 8.5Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.1: PHPUnit 12.3.1Compare Source
Added
--check-php-configurationCLI option for checking whether PHP is configured for testingChanged
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Fixed
#[TestWith]or#[TestWithJson]attributes are now properly reportedDataProviderMethodFinishedevent is now also emitted when the provided data set has an invalid keyLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.0: PHPUnit 12.3.0Compare Source
Added
#[IgnorePHPUnitWarnings]attribute for ignoring PHPUnit warnings#[TestDoxFormatter]and#[TestDoxFormatterExternal]attributes for configuring a custom TestDox formatter for tests that use data from data providersTestRunner\ChildProcessErroredeventConfiguration::includeTestSuites()andConfiguration::excludeTestSuites()Changed
@<data-set-name>format (compatible with--filterCLI option) in defect messages#[DataProvider*]attributes are mixed with#[TestWith*]attributesDeprecated
Configuration::includeTestSuite(), useConfiguration::includeTestSuites()insteadConfiguration::excludeTestSuite(), useConfiguration::excludeTestSuites()instead#[CoversNothing]on a test methodHow to install or update PHPUnit
v12.2.9: PHPUnit 12.2.9Compare Source
Fixed
fileattribute of<testClass>node of XML test list can be wrongHow to install or update PHPUnit
v12.2.8: PHPUnit 12.2.8Compare Source
Fixed
How to install or update PHPUnit
v12.2.7: PHPUnit 12.2.7Compare Source
Fixed
defects,randomconfiguration is supported by implementation, but it is not allowed by the XML configuration file schematestprefixHow to install or update PHPUnit
v12.2.6: PHPUnit 12.2.6Compare Source
Fixed
@no-named-argumentsleads to static analysis errors for variadic argumentsHow to install or update PHPUnit
v12.2.5: PHPUnit 12.2.5Compare Source
Fixed
<testsuite>element is missing requirednameattributeHow to install or update PHPUnit
v12.2.4: PHPUnit 12.2.4Compare Source
Changed
--include-git-informationCLI option or theincludeGitInformationattribute in the XML configuration fileHow to install or update PHPUnit
v12.2.3: PHPUnit 12.2.3Compare Source
Added
failOnPhpunitWarningattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-warningCLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default:true)--do-not-fail-on-deprecation,--do-not-fail-on-phpunit-warning,--do-not-fail-on-phpunit-deprecation,--do-not-fail-on-empty-test-suite,--do-not-fail-on-incomplete,--do-not-fail-on-notice,--do-not-fail-on-risky,--do-not-fail-on-skipped, and--do-not-fail-on-warningCLI options--do-not-report-useless-testsCLI option as a replacement for--dont-report-useless-testsDeprecated
--dont-report-useless-testsCLI option (use--do-not-report-useless-testsinstead)Fixed
ExpectationFailedExceptionHow to install or update PHPUnit
v12.2.2: PHPUnit 12.2.2Compare Source
Fixed
shortenArraysForExportThresholdXML configuration setting has no effect on all arrays exported for event-related value objectsHow to install or update PHPUnit
v12.2.1: PHPUnit 12.2.1Compare Source
Fixed
How to install or update PHPUnit
v12.2.0: PHPUnit 12.2.0Compare Source
Added
Experimental Support for Open Test Reporting XML
PHPUnit has supported reporting test results in the JUnit XML format for a long time. Unfortunately, there has never been a standard schema for the JUnit XML format. Common consumers of Clover XML log files interpret these files differently, which has led to frequent problems.
To address this, the JUnit team started the Open Test Reporting project, creating and maintaining language-agnostic XML and HTML test reporting formats. Unlike JUnit XML, Open Test Reporting's XML formats are extensible.
Logging in the Open Test Reporting XML format is controlled by the new
--log-otrCLI option and the new<otr>XML configuration element.This feature is experimental and the generated XML may change in order to enhance compliance with the Open Test Reporting project's XML schema definitions. The same applies to the XML schema definitions for information that is specific for PHP and PHPUnit. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
Experimental Support for OpenClover XML
PHPUnit has supported reporting code coverage information in the Clover XML format for a long time. Unfortunately, there has never been a standard schema for the Clover XML format. Common consumers of Clover XML log files interpret these files differently, which leads to frequent problems.
The original commercial Clover project has been superseded by the Open Source OpenClover project, which provides an XML schema for its OpenClover XML format. Rather than modifying the existing Clover XML reporter to comply with the OpenClover XML schema, thereby breaking backward compatibility, a new OpenClover XML reporter has been introduced.
This new reporter is controlled by the new CLI option,
--coverage-openclover, and the new XML configuration element,<openclover>. This code coverage reporter generates XML documents that validate against the OpenClover project's XML schema definition, with one exception: the<testproject>element is not generated.The existing Clover XML reporter, controlled by the
--coverage-cloverCLI option and the<clover>XML configuration element, remains unchanged.This feature is experimental and the generated XML may change to enhance compliance with the OpenClover XML schema definition. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
Miscellaneous
--with-telemetryCLI option that can be used together with--debugto print debugging information that includes telemetry informationTestCase::provideAdditionalInformation()method can now be used to emit aTest\AdditionalInformationProvidedeventTest\AfterLastTestMethodFailed,Test\AfterTestMethodFailed,Test\BeforeFirstTestMethodFailed,Test\BeforeTestMethodFailed,Test\PostConditionFailed,Test\PreConditionFailedevents are now emitted instead ofTest\AfterLastTestMethodErrored,Test\AfterTestMethodErrored,Test\BeforeFirstTestMethodErrored,Test\BeforeTestMethodErrored,Test\PostConditionErrored,Test\PreConditionErroredwhen theThrowableextendsAssertionFailedErrorto distinguish between errors and failures triggered in hook methodsTest\PreparationErroredevent is now emitted instead ofTest\PreparationFailedwhen theThrowabledoes not extendAssertionFailedErrorto distinguish between errors and failures triggered during test preparationTest\PreparationFailed::throwable()Changed
#[CoversNothing]and#[Covers*](or#[Uses*]) are used on a test class#[Covers*](or#[Uses*]) attribute is used multiple times on a test class#[Covers*]and#[Uses*]attributessetUp(), for example has a#[Test]attribute#[Small],#[Medium], or#[Large]is used on a test classHow to install or update PHPUnit
v12.1.6: PHPUnit 12.1.6Compare Source
Changed
createStubForIntersectionOfInterfaces()is called with a classHow to install or update PHPUnit
v12.1.5: PHPUnit 12.1.5Compare Source
Fixed
assertEmpty()andassertNotEmpty()use overly restrictivephpstan-assert emptydirectivesHow to install or update PHPUnit
v12.1.4: PHPUnit 12.1.4Compare Source
Added
displayDetailsOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--display-all-issuesCLI option for controlling whether PHPUnit should display details on all issues that are triggered (default:false)failOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--fail-on-all-issuesCLI option for controlling whether PHPUnit should fail on all issues that are triggered (default:false)Changed
E_STRICTconstantFixed
%aand%Amatches are not ignored from diff whenEXPECTFfailsHow to install or update PHPUnit
v12.1.3: PHPUnit 12.1.3Compare Source
Changed
memory_get_peak_usage()is now reset immediately before theTest\Preparedevent is emitted usingmemory_reset_peak_usage()so that (memory usage atTest\Finished- memory usage atTest\Prepared) is a better approximation of the memory usage of the testTelemetry\Infonow uses peak memory usage instead of memory usage (this affects--log-events-verbose-text)Fixed
error_log()is not displayed when test failsHow to install or update PHPUnit
v12.1.2: PHPUnit 12.1.2Compare Source
Fixed
How to install or update PHPUnit
v12.1.1: PHPUnit 12.1.1Compare Source
Fixed
willReturnMap()fails with nullable parameters when their default isnulland no argument is passed for themHow to install or update PHPUnit
v12.1.0: PHPUnit 12.1.0Compare Source
Added
expectErrorLog()for expectingerror_log()output#[WithEnvironmentVariable]for setting an environment variable for the duration of a testAfterTestMethodCalled,AfterTestMethodErrored,AfterTestMethodFinished,BeforeTestMethodCalled,BeforeTestMethodErrored,BeforeTestMethodFinished,PostConditionCalled,PostConditionErrored,PostConditionFinished,PreConditionCalled,PreConditionErrored, andPreConditionFinishedevent value objects now havetest()method that returns a value object representing the test method for which the hook method was calledChanged
phpunit --warm-coverage-cachebefore running tests.Deprecated
testClassName()method on theAfterTestMethodCalled,AfterTestMethodErrored,AfterTestMethodFinished,BeforeTestMethodCalled,BeforeTestMethodErrored,BeforeTestMethodFinished,PostConditionCalled,PostConditionErrored,PostConditionFinished,PreConditionCalled,PreConditionErrored, andPreConditionFinishedevent value objects (usetest()->className()instead)How to install or update PHPUnit
v12.0.10: PHPUnit 12.0.10Compare Source
Changed
How to install or update PHPUnit
v12.0.9: PHPUnit 12.0.9Compare Source
Fixed
with()on test doubles yields error with static analyzerHow to install or update PHPUnit
v12.0.8: PHPUnit 12.0.8Compare Source
Changed
How to install or update PHPUnit
v12.0.7: PHPUnit 12.0.7Compare Source
Fixed
How to install or update PHPUnit
v12.0.6: PHPUnit 12.0.6Compare Source
Fixed
$expectedand$actualare mixed up in failure description whenassertJsonFileEqualsJsonFile()failsHow to install or update PHPUnit
v12.0.5: PHPUnit 12.0.5Compare Source
Fixed
How to install or update PHPUnit
v12.0.4: PHPUnit 12.0.4Compare Source
Fixed
How to install or update PHPUnit
v12.0.3: PHPUnit 12.0.3Compare Source
Changed
TestCase::__construct()is now declaredfinal(it was annotated with@finalbefore and the announced changed from@finaltofinalfor PHPUnit 12 was forgotten)Fixed
includeUncoveredFilesconfiguration optionTest\PreparationFailedevent is now emitted in addition to aTest\Erroredevent when an unexpected exception is triggered in a before-test methodTest\Passedevent is no longer emitted in addition to aTest\FailedorTest\Erroredevent when an assertion failure or an unexpected exception is triggered in an after-test methodTestSuite\Finishedevent is now emitted when a before-first-test method errorsHow to install or update PHPUnit
v12.0.2: PHPUnit 12.0.2Compare Source
Changed
How to install or update PHPUnit
v12.0.1: PHPUnit 12.0.1Compare Source
Fixed
Assert::isType(),assertContainsOnly(),assertNotContainsOnly(), andcontainsOnly()How to install or update PHPUnit
v12.0.0: PHPUnit 12.0.0Compare Source
Added
#[CoversClassesThatExtendClass]and#[UsesClassesThatExtendClass]#[CoversClassesThatImplementInterface]and#[UsesClassesThatImplementInterface]#[CoversNamespace]and#[UsesNamespace]#[RequiresEnvironmentVariable]Changed
shortenArraysForExportThresholdis now10(limit export of arrays to 10 levels) instead of0(do not limit export of arrays)Deprecated
Assert::isType()(was soft-deprecated in PHPUnit 11.5)assertContainsOnly()(was soft-deprecated in PHPUnit 11.5)assertNotContainsOnly()(was soft-deprecated in PHPUnit 11.5)containsOnly()(was soft-deprecated in PHPUnit 11.5)Removed
TestCase::iniSet()TestCase::setLocale()TestCase::createTestProxy()TestCase::getMockForAbstractClass()TestCase::getMockFromWsdl()TestCase::getMockForTrait()TestCase::getObjectForTrait()MockBuilder::enableAutoload()andMockBuilder::disableAutoload()MockBuilder::allowMockingUnknownTypes()andMockBuilder::disallowMockingUnknownTypes()MockBuilder::enableProxyingToOriginalMethods(),MockBuilder::disableProxyingToOriginalMethods(), andMockBuilder::setProxyTarget()MockBuilder::getMockForTrait()MockBuilder::getMockForAbstractClass()MockBuilder::enableArgumentCloning()andMockBuilder::disableArgumentCloning()MockBuilder::addMethods()methodTestCasemethods for creating return stub configuration objectsassertStringNotMatchesFormat()andassertStringNotMatchesFormatFile()expects()on test stubs--group,--exclude-group,--covers,--uses, and--test-suffixCLI optionsrestrictDeprecationsattribute on the<source>element of the XML configuration file#[CoversClass]and#[UsesClass]attributesHow to install or update PHPUnit
v11.5.55: PHPUnit 11.5.55Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.54: PHPUnit 11.5.54Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.53: PHPUnit 11.5.53Compare Source
Fixed
SourceMappermay be deleted prematurely when multiple PHPUnit processes run in parallelLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.52: PHPUnit 11.5.52Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.51: PHPUnit 11.5.51Compare Source
Added
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.50: PHPUnit 11.5.50Compare Source
Changed
.coveragefiles in pull requests, a PHPT test will no longer be run if the temporary file for writing code coverage information already exists before the test runsLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.49: PHPUnit 11.5.49Compare Source
Fixed
Count::getCountOf()for unusal implementations ofIteratororIteratorAggregateLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.48: PHPUnit 11.5.48Compare Source
Changed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.47: PHPUnit 11.5.47Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.46: PHPUnit 11.5.46Compare Source
phpunit.pharrebuilt with PHP 8.4 to work around PHP-Scoper issue #1139Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.45: PHPUnit 11.5.45Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.44: PHPUnit 11.5.44Compare Source
Fixed
STDOUTwhenrewind()failsLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.43: PHPUnit 11.5.43Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.42: PHPUnit 11.5.42Compare Source
Fixed
failOnPhpunitWarning="false"has no effectLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.41: PHPUnit 11.5.41Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.40: PHPUnit 11.5.40Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.39: PHPUnit 11.5.39Compare Source
Changed
__sleep()and__wakeup()from test double code generation on PHP >= 8.5Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.38: PHPUnit 11.5.38Compare Source
Changed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.37: PHPUnit 11.5.37Compare Source
Changed
__sleep()method (which will be deprecated in PHP 8.5)Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.36: PHPUnit 11.5.36Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.35: PHPUnit 11.5.35Compare Source
Changed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.34Compare Source
v11.5.33: PHPUnit 11.5.33Compare Source
Changed
error_reporting=E_ALLfor--check-php-configurationFixed
expectUserDeprecationMessage*()fails when test is run in separate processLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.32: PHPUnit 11.5.32Compare Source
Changed
--check-php-configurationFixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.31: PHPUnit 11.5.31Compare Source
Fixed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations" from PHPUnit 11.5.29)Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.30: PHPUnit 11.5.30Compare Source
Changed
testSplObjectStoragemethods that will be deprecated in PHP 8.5Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.29: PHPUnit 11.5.29Compare Source
Added
--check-php-configurationCLI option for checking whether PHP is configured for testingChanged
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Fixed
#[TestWith]or#[TestWithJson]attributes are now properly reportedDataProviderMethodFinishedevent is now also emitted when the provided data set has an invalid keyLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.28: PHPUnit 11.5.28Compare Source
Fixed
fileattribute of<testClass>node of XML test list can be wrongHow to install or update PHPUnit
v11.5.27: PHPUnit 11.5.27Compare Source
Fixed
defects,randomconfiguration is supported by implementation, but it is not allowed by the XML configuration file schematestprefixHow to install or update PHPUnit
v11.5.26: PHPUnit 11.5.26Compare Source
Fixed
@no-named-argumentsleads to static analysis errors for variadic argumentsHow to install or update PHPUnit
v11.5.25: PHPUnit 11.5.25Compare Source
Fixed
<testsuite>element is missing requirednameattributeHow to install or update PHPUnit
v11.5.24: PHPUnit 11.5.24Compare Source
Added
failOnPhpunitWarningattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-warningCLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default:true)--do-not-fail-on-deprecation,--do-not-fail-on-phpunit-warning,--do-not-fail-on-phpunit-deprecation,--do-not-fail-on-empty-test-suite,--do-not-fail-on-incomplete,--do-not-fail-on-notice,--do-not-fail-on-risky,--do-not-fail-on-skipped, and--do-not-fail-on-warningCLI options--do-not-report-useless-testsCLI option as a replacement for--dont-report-useless-testsDeprecated
--dont-report-useless-testsCLI option (use--do-not-report-useless-testsinstead)Fixed
ExpectationFailedExceptionHow to install or update PHPUnit
v11.5.23: PHPUnit 11.5.23Compare Source
Fixed
shortenArraysForExportThresholdXML configuration setting has no effect on all arrays exported for event-related value objectsHow to install or update PHPUnit
v11.5.22: PHPUnit 11.5.22Compare Source
Changed
How to install or update PHPUnit
v11.5.21: PHPUnit 11.5.21Compare Source
Changed
createStubForIntersectionOfInterfaces()is called with a classHow to install or update PHPUnit
v11.5.20: PHPUnit 11.5.20Compare Source
Fixed
assertEmpty()andassertNotEmpty()use overly restrictivephpstan-assert emptydirectivesHow to install or update PHPUnit
v11.5.19: PHPUnit 11.5.19Compare Source
Added
displayDetailsOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--display-all-issuesCLI option for controlling whether PHPUnit should display details on all issues that are triggered (default:false)failOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--fail-on-all-issuesCLI option for controlling whether PHPUnit should fail on all issues that are triggered (default:false)Changed
E_STRICTconstantFixed
%aand%Amatches are not ignored from diff whenEXPECTFfailsHow to install or update PHPUnit
v11.5.18: PHPUnit 11.5.18Compare Source
Changed
memory_get_peak_usage()is now reset immediately before theTest\Preparedevent is emitted usingmemory_reset_peak_usage()so that (memory usage atTest\Finished- memory usage atTest\Prepared) is a better approximation of the memory usage of the testTelemetry\Infonow uses peak memory usage instead of memory usage (this affects--log-events-verbose-text)Fixed
How to install or update PHPUnit
v11.5.17: PHPUnit 11.5.17Compare Source
Fixed
How to install or update PHPUnit
v11.5.16: PHPUnit 11.5.16Compare Source
Fixed
willReturnMap()fails with nullable parameters when their default isnulland no argument is passed for themHow to install or update PHPUnit
v11.5.15: PHPUnit 11.5.15Compare Source
Changed
How to install or update PHPUnit
v11.5.14: PHPUnit 11.5.14Compare Source
Changed
How to install or update PHPUnit
v11.5.13: PHPUnit 11.5.13Compare Source
Changed
How to install or update PHPUnit
v11.5.12: PHPUnit 11.5.12Compare Source
Fixed
How to install or update PHPUnit
v11.5.11: PHPUnit 11.5.11Compare Source
Fixed
$expectedand$actualare mixed up in failure description whenassertJsonFileEqualsJsonFile()failsHow to install or update PHPUnit
v11.5.10: PHPUnit 11.5.10Compare Source
Fixed
How to install or update PHPUnit
v11.5.9: PHPUnit 11.5.9Compare Source
Fixed
How to install or update PHPUnit
v11.5.8: PHPUnit 11.5.8Compare Source
Fixed
Test\PreparationFailedevent is now emitted in addition to aTest\Erroredevent when an unexpected exception is triggered in a before-test methodTest\Passedevent is no longer emitted in addition to aTest\FailedorTest\Erroredevent when an assertion failure or an unexpected exception is triggered in an after-test methodTestSuite\Finishedevent is now emitted when a before-first-test method errorsHow to install or update PHPUnit
v11.5.7: PHPUnit 11.5.7Compare Source
Changed
includeUncoveredFilesconfiguration option is no longer deprecated--debugoutputHow to install or update PHPUnit
v11.5.6: PHPUnit 11.5.6Compare Source
Changed
SourceMapperFixed
stringcannot be used in customized TestDox outputHow to install or update PHPUnit
v11.5.5: PHPUnit 11.5.5Compare Source
Changed
How to install or update PHPUnit
v11.5.4: PHPUnit 11.5.4Compare Source
Changed
#[CoversTrait]and#[UsesTrait]attributes is no longer deprecated#[CoversMethod]and#[UsesMethod]attributes is no longer deprecatedFixed
SourceMapperto scan all<source/>filesHow to install or update PHPUnit
v11.5.3: PHPUnit 11.5.3Compare Source
Added
Test\AfterLastTestMethodErrored,Test\AfterTestMethodErrored,Test\BeforeTestMethodErrored,Test\PostConditionErrored, andTest\PreConditionErroredeventsFixed
--list-tests-xmlis broken when a group with a numeric name is definedsystem-outelement in JUnit XML logfileHow to install or update PHPUnit
v11.5.2: PHPUnit 11.5.2Compare Source
Fixed
assertArrayHasKey(),assertArrayNotHasKey(),arrayHasKey(), andArrayHasKey::__construct()do not support all possible key types--migrate-configurationdoes not removebeStrictAboutTodoAnnotatedTestsattribute from XML configuration fileHow to install or update PHPUnit
v11.5.1: PHPUnit 11.5.1Compare Source
Added
DefaultResultCache::mergeWith()for merging result cache instancesFixed
How to install or update PHPUnit
v11.5.0: PHPUnit 11.5.0Compare Source
Added
assertContainsNotOnlyInstancesOf()in thePHPUnit\Framework\Assertclass as the inverse of theassertContainsOnlyInstancesOf()methodassertContainsOnlyArray(),assertContainsOnlyBool(),assertContainsOnlyCallable(),assertContainsOnlyFloat(),assertContainsOnlyInt(),assertContainsOnlyIterable(),assertContainsOnlyNull(),assertContainsOnlyNumeric(),assertContainsOnlyObject(),assertContainsOnlyResource(),assertContainsOnlyClosedResource(),assertContainsOnlyScalar(), andassertContainsOnlyString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericassertContainsOnly()methodassertContainsNotOnlyArray(),assertContainsNotOnlyBool(),assertContainsNotOnlyCallable(),assertContainsNotOnlyFloat(),assertContainsNotOnlyInt(),assertContainsNotOnlyIterable(),assertContainsNotOnlyNull(),assertContainsNotOnlyNumeric(),assertContainsNotOnlyObject(),assertContainsNotOnlyResource(),assertContainsNotOnlyClosedResource(),assertContainsNotOnlyScalar(), andassertContainsNotOnlyString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericassertNotContainsOnly()methodcontainsOnlyArray(),containsOnlyBool(),containsOnlyCallable(),containsOnlyFloat(),containsOnlyInt(),containsOnlyIterable(),containsOnlyNull(),containsOnlyNumeric(),containsOnlyObject(),containsOnlyResource(),containsOnlyClosedResource(),containsOnlyScalar(), andcontainsOnlyString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericcontainsOnly()methodisArray(),isBool(),isCallable(),isFloat(),isInt(),isIterable(),isNumeric(),isObject(),isResource(),isClosedResource(),isScalar(),isString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericisType()methodTestRunner\ChildProcessStartedandTestRunner\ChildProcessFinishedeventsChanged
SKIPIFsection of PHPT test in separate process when it is free of side effectsCLEANsection of PHPT test in separate process when it is free of side effects that modify the parent processDeprecated
isType()(useisArray(),isBool(),isCallable(),isFloat(),isInt(),isIterable(),isNull(),isNumeric(),isObject(),isResource(),isClosedResource(),isScalar(), orisString()instead)assertContainsOnly()(useassertContainsOnlyArray(),assertContainsOnlyBool(),assertContainsOnlyCallable(),assertContainsOnlyFloat(),assertContainsOnlyInt(),assertContainsOnlyIterable(),assertContainsOnlyNumeric(),assertContainsOnlyObject(),assertContainsOnlyResource(),assertContainsOnlyClosedResource(),assertContainsOnlyScalar(), orassertContainsOnlyString()instead)assertNotContainsOnly()(useassertContainsNotOnlyArray(),assertContainsNotOnlyBool(),assertContainsNotOnlyCallable(),assertContainsNotOnlyFloat(),assertContainsNotOnlyInt(),assertContainsNotOnlyIterable(),assertContainsNotOnlyNumeric(),assertContainsNotOnlyObject(),assertContainsNotOnlyResource(),assertContainsNotOnlyClosedResource(),assertContainsNotOnlyScalar(), orassertContainsNotOnlyString()instead)containsOnly()(usecontainsOnlyArray(),containsOnlyBool(),containsOnlyCallable(),containsOnlyFloat(),containsOnlyInt(),containsOnlyIterable(),containsOnlyNumeric(),containsOnlyObject(),containsOnlyResource(),containsOnlyClosedResource(),containsOnlyScalar(), orcontainsOnlyString()instead)How to install or update PHPUnit
v11.4.4: PHPUnit 11.4.4Compare Source
Fixed
ignoreIndirectDeprecations=truesuppresses deprecations triggered in test codeHow to install or update PHPUnit
v11.4.3: PHPUnit 11.4.3Compare Source
Changed
assertGreaterThan(),assertGreaterThanOrEqual(),assertLessThan(), andassertLessThanOrEqual()Fixed
How to install or update PHPUnit
v11.4.2: PHPUnit 11.4.2Compare Source
Changed
Fixed
How to install or update PHPUnit
v11.4.1: PHPUnit 11.4.1Compare Source
Changed
StringMatchesFormatDescriptionconstraint to be consistent with PHP'srun-tests.phpFixed
E_DEPRECATEDissuesHow to install or update PHPUnit
v11.4.0: PHPUnit 11.4.0Compare Source
Changed
#[RequiresPhpunitExtension]attributevendor/phpunit/phpunit/phpunit.xsd(instead ofhttps://schema.phpunit.de/X.Y/phpunit.xsd) when PHPUnit was installed using Composer andphpunit --generate-configurationwas invoked in the directory wherevendoris located--migrate-configurationcommand no longer replacesvendor/phpunit/phpunit/phpunit.xsdwithhttps://schema.phpunit.de/X.Y/phpunit.xsd--list-groupsnow shows how many tests a group contains--list-suitesnow shows how many tests a test suite containsDeprecated
includeUncoveredFilesconfiguration option#[CoversTrait]and#[UsesTrait]attributes#[CoversMethod]and#[UsesMethod]attributes (and respective annotations)How to install or update PHPUnit
v11.3.6: PHPUnit 11.3.6Compare Source
Changed
E_STRICTconstant in PHP 8.4Fixed
trim()med when it contains$characterHow to install or update PHPUnit
v11.3.5: PHPUnit 11.3.5Compare Source
Fixed
staticreturn type declaration is not properly initializednameproperty on<testsuites>element in JUnit XML logfileCallbackthrows aTypeErrorwhen checking acallablehas variadic parametersHow to install or update PHPUnit
v11.3.4: PHPUnit 11.3.4Compare Source
Fixed
assertJsonStringEqualsJsonString()considers objects with sequential numeric keys equal to be arraysCallbackconstraint does not handle variadic arguments correctly when used for mock object expectations$at the beginning gets truncated when used with a data providerdefaultgroupHow to install or update PHPUnit
v11.3.3: PHPUnit 11.3.3Compare Source
Added
failOnPhpunitDeprecationattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-deprecationCLI option for controlling whether PHPUnit deprecations should be considered when determining the test runner's shell exit code (default: do not consider)displayDetailsOnPhpunitDeprecationsattribute on the<phpunit>element of the XML configuration file and--display-phpunit-deprecationsCLI option for controlling whether details on PHPUnit deprecations should be displayed (default: do not display)Changed
--fail-on-phpunit-deprecationCLI option or thefailOnPhpunitDeprecation="true"attribute on the<phpunit>element of the XML configuration file.--display-phpunit-deprecationsCLI option or thedisplayDetailsOnPhpunitDeprecationsattribute on the<phpunit>element of the XML configuration file.How to install or update PHPUnit
v11.3.2: PHPUnit 11.3.2Compare Source
Changed
nameproperty on<testsuites>element in JUnit XML logfile.phpstorm.meta.phpfile as methods such asTestCase::createStub()use generics / template types for their return types and PhpStorm, for example, uses that informationFixed
@operatorHow to install or update PHPUnit
v11.3.1: PHPUnit 11.3.1Compare Source
Changed
How to install or update PHPUnit
v11.3.0: PHPUnit 11.3.0Compare Source
Added
shortenArraysForExportThresholdattribute on the<phpunit>element of the XML configuration file to limit the export of arrays to a specified number of elements (default:0/ do not limit the export of arrays)--extensionCLI option to register a test runner extensionChanged
--generate-configurationnow limits the export of arrays to 10 elements in order to improve performanceHow to install or update PHPUnit
v11.2.9: PHPUnit 11.2.9Compare Source
Fixed
--list-testsand--list-tests-xmlCLI options do not report error when data provider method throws exceptionHow to install or update PHPUnit
v11.2.8: PHPUnit 11.2.8Compare Source
Fixed
Test\Passedevent is not emitted for PHPT tests--coverage-filterCLI option could not be used multiple timesHow to install or update PHPUnit
v11.2.7: PHPUnit 11.2.7Compare Source
Changed
--prefer-lowestCLI option also get recent versions)Fixed
phpunit.xmlare not handled correctly when--generate-configurationis usedHow to install or update PHPUnit
v11.2.6: PHPUnit 11.2.6Compare Source
Changed
How to install or update PHPUnit
v11.2.5: PHPUnit 11.2.5Compare Source
Changed
array_pop()instead ofarray_shift()for processingTestobjects inTestSuite::run()and optimizeTestSuite::isEmpty()How to install or update PHPUnit
v11.2.4: PHPUnit 11.2.4Compare Source
Changed
TestCaseobjects early that use a data providerHow to install or update PHPUnit
v11.2.3: PHPUnit 11.2.3Compare Source
Changed
debug_backtrace()How to install or update PHPUnit
v11.2.2: PHPUnit 11.2.2Compare Source
Changed
TestCaseobject after its test was runFixed
How to install or update PHPUnit
v11.2.1: PHPUnit 11.2.1Compare Source
Fixed
cacheDirectoryattribute from<coverage>element when migrating from PHPUnit 11.1 to PHPUnit 11.2How to install or update PHPUnit
v11.2.0: PHPUnit 11.2.0Compare Source
Added
#[CoversTrait]and#[UsesTrait]attributesreadonlyclassesassertObjectNotEquals()Deprecated
#[CoversClass]and#[UsesClass]attributesHow to install or update PHPUnit
v11.1.3: PHPUnit 11.1.3Compare Source
Fixed
How to install or update PHPUnit
v11.1.2: PHPUnit 11.1.2Compare Source
Fixed
@testWithannotation may generatePHP Warning: Uninitialized string offset 0#[CoversMethod]attribute is not considered for risky test checkHow to install or update PHPUnit
v11.1.1: PHPUnit 11.1.1Compare Source
Fixed
#[CoversClass]and#[UsesClass]attributes can no longer target traitsHow to install or update PHPUnit
v11.1.0: PHPUnit 11.1.0Compare Source
Added
#[DisableReturnValueGenerationForTestDoubles]attribute for disabling return value generation for test doubles created usingcreateMock(),createMockForIntersectionOfInterfaces(),createPartialMock(),createStub(), andcreateStubForIntersectionOfInterfaces()#[CoversMethod]and#[UsesMethod]attributes for more fine-grained code coverage targeting--filter,--exclude-filter,--group, and--exclude-groupwhen listing tests using--list-testsand--list-tests-xmlas well as listing groups with--list-groups#[CoversClass]and#[UsesClass]attributes--only-summary-for-coverage-textCLI option to reduce the code coverage report in text format to a summary--show-uncovered-for-coverage-textCLI option to expand the code coverage report in text format to include a list of uncovered filesChanged
--generate-configurationnow generates<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">instead of<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">--group,--exclude-group,--covers,--uses, and--test-suffixCLI options to be used multiple timesPHPUnit\Framework\TestCase::__construct()is now annotated to be final in preparation for declaring itfinalin PHPUnit 12DeprecationTriggered,ErrorTriggered,NoticeTriggered,PhpDeprecationTriggered,PhpNoticeTriggered,PhpWarningTriggered, andWarningTriggeredevents are represented as textDeprecated
restrictDeprecationsattribute on the<source>element of the XML configuration file is now deprecated in favor of theignoreSelfDeprecations,ignoreDirectDeprecations, andignoreIndirectDeprecationsattributes--group,--exclude-group,--covers,--uses, and--test-suffixCLI optionsHow to install or update PHPUnit
v11.0.10: PHPUnit 11.0.10Compare Source
Changed
PHPUnitPHARinstead of justPHPUnitfor the PHAR distribution of PHPUnitHow to install or update PHPUnit
v11.0.9: PHPUnit 11.0.9Compare Source
Changed
proc_open()if not really neededFixed
How to install or update PHPUnit
v11.0.8: PHPUnit 11.0.8Compare Source
Fixed
How to install or update PHPUnit
v11.0.7: PHPUnit 11.0.7Compare Source
Changed
Groups::groups()NamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName()once againFixed
How to install or update PHPUnit
v11.0.6: PHPUnit 11.0.6Compare Source
Changed
NamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName()TestRunner::runTestWithTimeout()Telemetry\System::snapshot()ExecutionOrderDependency::getTarget()callNamePrettifier::prettifyTestMethodName()Fixed
assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys()does not correctly handle array order-dCLI option multiple times triggers warningHow to install or update PHPUnit
v11.0.5: PHPUnit 11.0.5Compare Source
Fixed
HRTime::duration()throwsInvalidArgumentException--exclude-filterCLI option does not workHow to install or update PHPUnit
v11.0.4Compare Source
v11.0.3Compare Source
v11.0.2Compare Source
v11.0.1Compare Source
v11.0.0Compare Source
v10.5.63: PHPUnit 10.5.63Compare Source
Fixed
Learn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.62: PHPUnit 10.5.62Compare Source
Changed
.coveragefiles in pull requests, a PHPT test will no longer be run if the temporary file for writing code coverage information already exists before the test runsLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.61: PHPUnit 10.5.61Compare Source
Changed
PHPUnit\Framework\MockObjectexceptions are now subtypes ofPHPUnit\ExceptionLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.60: PHPUnit 10.5.60Compare Source
phpunit.pharrebuilt with PHP 8.4 to work around PHP-Scoper issue #1139Learn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.59: PHPUnit 10.5.59Compare Source
Changed
PHPUnit\Runner\TestSuiteSorterthat was only used in the tests for this classLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.58: PHPUnit 10.5.58Compare Source
Fixed
failOnPhpunitWarning="false"has no effectLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.57: PHPUnit 10.5.57Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.56: PHPUnit 10.5.56Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.55: PHPUnit 10.5.55Compare Source
Changed
__sleep()and__wakeup()from test double code generation on PHP >= 8.5Learn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.54: PHPUnit 10.5.54Compare Source
Changed
__sleep()method (which will be deprecated in PHP 8.5)Learn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.53Compare Source
v10.5.52: PHPUnit 10.5.52Compare Source
Changed
error_reporting=E_ALLfor--check-php-configurationLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.51: PHPUnit 10.5.51Compare Source
Changed
--check-php-configurationLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.50: PHPUnit 10.5.50Compare Source
Changed
testSplObjectStoragemethods that will be deprecated in PHP 8.5Learn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.49: PHPUnit 10.5.49Compare Source
Added
--check-php-configurationCLI option for checking whether PHP is configured for testingFixed
#[TestWith]or#[TestWithJson]attributes are now properly reportedLearn how to install or update PHPUnit 10.5 in the documentation.
Keep up to date with PHPUnit:
v10.5.48: PHPUnit 10.5.48Compare Source
Fixed
defects,randomconfiguration is supported by implementation, but it is not allowed by the XML configuration file schemaHow to install or update PHPUnit
v10.5.47: PHPUnit 10.5.47Compare Source
Added
failOnPhpunitWarningattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-warningCLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default:true)--do-not-fail-on-deprecation,--do-not-fail-on-phpunit-warning,--do-not-fail-on-phpunit-deprecation,--do-not-fail-on-empty-test-suite,--do-not-fail-on-incomplete,--do-not-fail-on-notice,--do-not-fail-on-risky,--do-not-fail-on-skipped, and--do-not-fail-on-warningCLI options--do-not-report-useless-testsCLI option as a replacement for--dont-report-useless-testsDeprecated
--dont-report-useless-testsCLI option (use--do-not-report-useless-testsinstead)Fixed
ExpectationFailedExceptionHow to install or update PHPUnit
v10.5.46: PHPUnit 10.5.46Compare Source
Added
displayDetailsOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--display-all-issuesCLI option for controlling whether PHPUnit should display details on all issues that are triggered (default:false)failOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--fail-on-all-issuesCLI option for controlling whether PHPUnit should fail on all issues that are triggered (default:false)Changed
E_STRICTconstantHow to install or update PHPUnit
v10.5.45: PHPUnit 10.5.45Compare Source
Changed
--debugoutputHow to install or update PHPUnit
v10.5.44: PHPUnit 10.5.44Compare Source
Fixed
stringcannot be used in customized TestDox outputHow to install or update PHPUnit
v10.5.43: PHPUnit 10.5.43Compare Source
Changed
How to install or update PHPUnit
v10.5.42: PHPUnit 10.5.42Compare Source
Fixed
SourceMapperto scan all<source/>filesHow to install or update PHPUnit
v10.5.41: PHPUnit 10.5.41Compare Source
Added
Test\AfterLastTestMethodErrored,Test\AfterTestMethodErrored,Test\BeforeTestMethodErrored,Test\PostConditionErrored, andTest\PreConditionErroredeventsFixed
system-outelement in JUnit XML logfileHow to install or update PHPUnit
v10.5.40: PHPUnit 10.5.40Compare Source
Fixed
assertArrayHasKey(),assertArrayNotHasKey(),arrayHasKey(), andArrayHasKey::__construct()do not support all possible key types--migrate-configurationdoes not removebeStrictAboutTodoAnnotatedTestsattribute from XML configuration fileHow to install or update PHPUnit
v10.5.39: PHPUnit 10.5.39Compare Source
Added
DefaultResultCache::mergeWith()for merging result cache instancesFixed
How to install or update PHPUnit
v10.5.38: PHPUnit 10.5.38Compare Source
Changed
How to install or update PHPUnit
v10.5.37: PHPUnit 10.5.37Compare Source
Fixed
How to install or update PHPUnit
v10.5.36: PHPUnit 10.5.36Compare Source
Changed
StringMatchesFormatDescriptionconstraint to be consistent with PHP'srun-tests.phpFixed
PHPUnit\Framework\Exceptiondoes not handle string error codes (PDOExceptionwith error code'HY000', for example)How to install or update PHPUnit
v10.5.35: PHPUnit 10.5.35Compare Source
Changed
E_STRICTconstant in PHP 8.4Fixed
trim()med when it contains$characterHow to install or update PHPUnit
v10.5.34: PHPUnit 10.5.34Compare Source
Fixed
nameproperty on<testsuites>element in JUnit XML logfileCallbackthrows aTypeErrorwhen checking acallablehas variadic parametersHow to install or update PHPUnit
v10.5.33: PHPUnit 10.5.33Compare Source
Fixed
assertJsonStringEqualsJsonString()considers objects with sequential numeric keys equal to be arraysCallbackconstraint does not handle variadic arguments correctly when used for mock object expectations$at the beginning gets truncated when used with a data providerHow to install or update PHPUnit
v10.5.32: PHPUnit 10.5.32Compare Source
Added
failOnPhpunitDeprecationattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-deprecationCLI option for controlling whether PHPUnit deprecations should be considered when determining the test runner's shell exit code (default: do not consider)displayDetailsOnPhpunitDeprecationsattribute on the<phpunit>element of the XML configuration file and--display-phpunit-deprecationsCLI option for controlling whether details on PHPUnit deprecations should be displayed (default: do not display)Changed
--fail-on-phpunit-deprecationCLI option or thefailOnPhpunitDeprecation="true"attribute on the<phpunit>element of the XML configuration file.--display-phpunit-deprecationsCLI option or thedisplayDetailsOnPhpunitDeprecationsattribute on the<phpunit>element of the XML configuration file.How to install or update PHPUnit
v10.5.31: PHPUnit 10.5.31Compare Source
Changed
nameproperty on<testsuites>element in JUnit XML logfile.phpstorm.meta.phpfile as methods such asTestCase::createStub()use generics / template types for their return types and PhpStorm, for example, uses that informationFixed
@operatorHow to install or update PHPUnit
v10.5.30: PHPUnit 10.5.30Compare Source
Changed
How to install or update PHPUnit
v10.5.29: PHPUnit 10.5.29Compare Source
Fixed
--list-testsand--list-tests-xmlCLI options do not report error when data provider method throws exceptionHow to install or update PHPUnit
v10.5.28: PHPUnit 10.5.28Compare Source
Fixed
Test\Passedevent is not emitted for PHPT tests--coverage-filterCLI option could not be used multiple timesHow to install or update PHPUnit
v10.5.27: PHPUnit 10.5.27Compare Source
Changed
--prefer-lowestCLI option also get recent versions)Fixed
phpunit.xmlare not handled correctly when--generate-configurationis usedHow to install or update PHPUnit
v10.5.26: PHPUnit 10.5.26Compare Source
Added
--only-summary-for-coverage-textCLI option to reduce the code coverage report in text format to a summary--show-uncovered-for-coverage-textCLI option to expand the code coverage report in text format to include a list of uncovered filesHow to install or update PHPUnit
v10.5.25: PHPUnit 10.5.25Compare Source
Changed
How to install or update PHPUnit
v10.5.24: PHPUnit 10.5.24Compare Source
Changed
array_pop()instead ofarray_shift()for processingTestobjects inTestSuite::run()and optimizeTestSuite::isEmpty()How to install or update PHPUnit
v10.5.23: PHPUnit 10.5.23Compare Source
Changed
TestCaseobjects early that use a data providerHow to install or update PHPUnit
v10.5.22: PHPUnit 10.5.22Compare Source
Changed
debug_backtrace()How to install or update PHPUnit
v10.5.21: PHPUnit 10.5.21Compare Source
Changed
TestCaseobject after its test was runHow to install or update PHPUnit
v10.5.20: PHPUnit 10.5.20Compare Source
How to install or update PHPUnit
v10.5.19: PHPUnit 10.5.19Compare Source
Fixed
method()on a test stub created usingcreateStubForIntersectionOfInterfaces()throws an unexpected exceptionHow to install or update PHPUnit
v10.5.18: PHPUnit 10.5.18Compare Source
Deprecated
Fixed
@testWithannotation may generatePHP Warning: Uninitialized string offset 0How to install or update PHPUnit
v10.5.17: PHPUnit 10.5.17Compare Source
Changed
PHPUnitPHARinstead of justPHPUnitfor the PHAR distribution of PHPUnitHow to install or update PHPUnit
v10.5.16: PHPUnit 10.5.16Compare Source
Changed
proc_open()if not really neededFixed
How to install or update PHPUnit
v10.5.15: PHPUnit 10.5.15Compare Source
Fixed
How to install or update PHPUnit
v10.5.14: PHPUnit 10.5.14Compare Source
Changed
Groups::groups()NamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName()once againFixed
How to install or update PHPUnit
v10.5.13: PHPUnit 10.5.13Compare Source
Changed
NamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName()TestRunner::runTestWithTimeout()Telemetry\System::snapshot()ExecutionOrderDependency::getTarget()callNamePrettifier::prettifyTestMethodName()Fixed
-dCLI option multiple times triggers warningHow to install or update PHPUnit
v10.5.12: PHPUnit 10.5.12Compare Source
Fixed
HRTime::duration()throwsInvalidArgumentExceptionHow to install or update PHPUnit
v10.5.11Compare Source
v10.5.10Compare Source
v10.5.9Compare Source
v10.5.8Compare Source
v10.5.7Compare Source
v10.5.6Compare Source
v10.5.5Compare Source
v10.5.4Compare Source
v10.5.3Compare Source
v10.5.2Compare Source
v10.5.1Compare Source
v10.5.0Compare Source
v10.4.2Compare Source
v10.4.1Compare Source
v10.4.0Compare Source
v10.3.5Compare Source
v10.3.4Compare Source
v10.3.3Compare Source
v10.3.2Compare Source
v10.3.1Compare Source
v10.3.0Compare Source
v10.2.7Compare Source
v10.2.6Compare Source
v10.2.5Compare Source
v10.2.4Compare Source
v10.2.3Compare Source
v10.2.2Compare Source
v10.2.1Compare Source
v10.2.0Compare Source
v10.1.3Compare Source
v10.1.2Compare Source
v10.1.1Compare Source
v10.1.0Compare Source
Configuration
📅 Schedule: Branch creation - "after 3am every weekday,every weekend" in timezone Europe/Amsterdam, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: composer.lock
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.