All notable changes of the PHPUnit 7.5 release series are documented in this file using the Keep a CHANGELOG principles.
\Countable
needs to be checked before \EmptyIterator
ReflectionType::getName()
instead of ReflectionType::__toString()
(which is deprecated in PHP 7.4)EmptyIterator
instances are not handled correctly by Count
and IsEmpty
constraintsgetObjectForTrait()
does not work for traits that declare a constructorlibxml_clear_errors()
is now called to clear the libxml error bufferThrowable
and Exception
are ignored@coversNothing
annotation does not prevent code coverage data collectionwillThrowException()
only accepts Exception
, not Throwable
.phpunit.result.cache
file is all over the placeTypeError
when an incorrect file path is givenTestCase::getExpectedExceptionMessage()
and TestCase::getExpectedExceptionMessageRegExp()
assertObjectHasAttribute()
is too strictgenerateClassFromWsdl()
does not handle methods with multiple output valuesConstraintTestCase
--SECTION--
throws unhandled exceptionStringEndsWith
matches too looselyphpunit.phar
with PHPDBG does not work with auto_globals_jit=On
@ticket
or @group
annotations no longer worktearDownAfterClass()
kill PHPUnitassertArraySubset()
is now deprecated. There is no behavioral change in this version of PHPUnit. Using this method will trigger a deprecation warning in PHPUnit 8 and in PHPUnit 9 this method will be removed..
correctly@requires
function swallows digits at the end of function nameDataProviderTestSuite::usesDataProvider()
assertEqualsCanonicalizing()
, assertEqualsIgnoringCase()
, assertEqualsWithDelta()
, assertNotEqualsCanonicalizing()
, assertNotEqualsIgnoringCase()
, and assertNotEqualsWithDelta()
as alternatives to using assertEquals()
and assertNotEquals()
with the $delta
, $canonicalize
, or $ignoreCase
parametersassertIsArray()
, assertIsBool()
, assertIsFloat()
, assertIsInt()
, assertIsNumeric()
, assertIsObject()
, assertIsResource()
, assertIsString()
, assertIsScalar()
, assertIsCallable()
, assertIsIterable()
, assertIsNotArray()
, assertIsNotBool()
, assertIsNotFloat()
, assertIsNotInt()
, assertIsNotNumeric()
, assertIsNotObject()
, assertIsNotResource()
, assertIsNotString()
, assertIsNotScalar()
, assertIsNotCallable()
, assertIsNotIterable()
as alternatives to assertInternalType()
and assertNotInternalType()
TestHook
that fires after each test, regardless of resultassertStringContainsString()
, assertStringContainsStringIgnoringCase()
, assertStringNotContainsString()
, and assertStringNotContainsStringIgnoringCase()
assertInternalType()
and assertNotInternalType()
are now deprecated. There is no behavioral change in this version of PHPUnit. Using these methods will trigger a deprecation warning in PHPUnit 8 and in PHPUnit 9 these methods will be removed.assertAttributeContains()
, assertAttributeNotContains()
, assertAttributeContainsOnly()
, assertAttributeNotContainsOnly()
, assertAttributeCount()
, assertAttributeNotCount()
, assertAttributeEquals()
, assertAttributeNotEquals()
, assertAttributeEmpty()
, assertAttributeNotEmpty()
, assertAttributeGreaterThan()
, assertAttributeGreaterThanOrEqual()
, assertAttributeLessThan()
, assertAttributeLessThanOrEqual()
, assertAttributeSame()
, assertAttributeNotSame()
, assertAttributeInstanceOf()
, assertAttributeNotInstanceOf()
, assertAttributeInternalType()
, assertAttributeNotInternalType()
, attributeEqualTo()
, readAttribute()
, getStaticAttribute()
, and getObjectAttribute()
are now deprecated. There is no behavioral change in this version of PHPUnit. Using these methods will trigger a deprecation warning in PHPUnit 8 and in PHPUnit 9 these methods will be removed.$delta
, $maxDepth
, $canonicalize
, and $ignoreCase
of assertEquals()
and assertNotEquals()
are now deprecated. There is no behavioral change in this version of PHPUnit. Using these parameters will trigger a deprecation warning in PHPUnit 8 and in PHPUnit 9 these parameters will be removed.@expectedException
, @expectedExceptionCode
, @expectedExceptionMessage
, and @expectedExceptionMessageRegExp
are now deprecated. There is no behavioral change in this version of PHPUnit. Using these annotations will trigger a deprecation warning in PHPUnit 8 and in PHPUnit 9 these annotations will be removed.assertContains()
and assertNotContains()
on string
haystacks is now deprecated. There is no behavioral change in this version of PHPUnit. Using these methods on string
haystacks will trigger a deprecation warning in PHPUnit 8 and in PHPUnit 9 these methods cannot be used on on string
haystacks anymore.$ignoreCase
, $checkForObjectIdentity
, and $checkForNonObjectIdentity
of assertContains()
and assertNotContains()
are now deprecated. There is no behavioral change in this version of PHPUnit. Using these parameters will trigger a deprecation warning in PHPUnit 8 and in PHPUnit 9 these parameters will be removed.