NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3540 most downloaded on Packagist
The Phake mock testing library
Last release 7 months ago
10 Feb 2026
Release timing varies
gaps range from 1 weeks to 13 months
Rarely documented
notes for 8 of 41 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
52 releases · first in 2012
Fix SmartDefaultAnswerTest::testCallableReturn() by @TimWolla in #333
#334 Add support for Comparator 8 / PHPUnit 13
Shorthand Stub and Verify notation are deprecated
Replace Phake::when($mock)->foo by Phake::when($mock)->foo(Phake::anyParameters()) and Phake::verify($mock)->foo by Phake::verify($mock)->foo(Phake::anyParameters()).
One column per quarter.
Remove PHP8.5 deprecation notices
Remove PHP8.5 deprecation notices
Nothing published for this version
### New Feature #326 Add support for Comparator 7 / PHPUnit 12
#326 Add support for Comparator 7 / PHPUnit 12
Nothing published for this version
Nothing published for this version
FIX - SmartDefaultAnswer is unable to return interface
Provide a better type-hint for mock and partial mock objects by @niconoe- in #313
Full Changelog: v4.4.0...v4.5.0
New Feature #312 Add support for Comparator 5 / PHPUnit 10
#312 Add support for Comparator 5 / PHPUnit 10
Add support for PHP8.2 null and false stand-alone types PHP8.2 introduced null and false stand-alone types . It's new possible to mock an object using
Add support for PHP8.2 null and false stand-alone types
PHP8.2 introduced null and false stand-alone types.
It's new possible to mock an object using those types.
Add support for PHP8.2 DNF Types
PHP8.2 introduced Disjunctive Normal Form Types.
It's now possible to mock an object using DNF types.
#308 - Unable to use PHP8 named arguments on static method
#307 - Phake\Matchers\IArgumentMatcher doesn't work as expected
### New Features #304 - Add support for PHP8.1 new in initializers PHP8.1 introduced new in initializers Phake 4.2 can now create mock of object using
#304 - Add support for PHP8.1 new in initializers PHP8.1 introduced new in initializers Phake 4.2 can now create mock of object using this feature.
#303 - Add support for PHP8.1 intersection types and never return type
PHP8.1 introduced intersection types and never return type.
Phake 4.2 supports those new types. When a mocked method returning never is called, Phake will by default throw a Phake\Exception\NeverReturnMethodCalledException exception. Calling Phake::when($mock)->thenReturn($x) will have no effect on this method result.
#301 - Add #[\ReturnTypeWillChange] on mocked internal methods on PHP8.1+
All internal mocked method under PHP8.1+ will have #[\ReturnTypeWillChange] attribute to avoid any Deprecation warnings.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →