phake/phake
The Phake mock testing library
v4.7.0
8.3M downloads/mo
#3245 most downloaded on Packagist
phake/phake
What this package is like to depend on
Last release 6 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
2 releases in the last 12 months
see the full history below
Release timeline
52 releases · May 2012 to Feb 2026Releases
latest 52-
v4.7.010 Feb 2026Release notes
Open source →What's Changed
- Fix
SmartDefaultAnswerTest::testCallableReturn()by @TimWolla in #333 - Add support for PHPUnit 13 by @TimWolla in #334
New Contributors
Full Changelog: v4.6.2...v4.7.0
Release notes
Open source →New Feature
#334 Add support for Comparator 8 / PHPUnit 13
Deprecation
Shorthand Stub and Verify notation are deprecated Replace
Phake::when($mock)->foo by Phake::when($mock)->foo(Phake::anyParameters())andPhake::verify($mock)->foobyPhake::verify($mock)->foo(Phake::anyParameters()). - Fix
-
v4.6.225 Nov 2025 -
v4.6.111 Mar 2025Nothing published for this version
-
v4.6.010 Feb 2025 -
v4.5.309 Dec 2024Nothing published for this version
-
v4.5.228 Nov 2024Nothing published for this version
-
v4.5.111 Oct 2024Release notes
Open source → -
v4.5.005 Mar 2024Release notes
Open source →What's Changed
- Provide a better type-hint for mock and partial mock objects by @niconoe- in #313
- Add Phake\Mock attribute class by @pierredup in #318
- Make Phake compatible with PHPUnit 11 from Phake v4.4. by @niconoe- in #322
Full Changelog: v4.4.0...v4.5.0
-
v4.4.010 Feb 2023 -
v4.3.013 Dec 2022Release notes
Open source →New Features
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.Changes
#308 - Unable to use PHP8 named arguments on static method
#307 - Phake\Matchers\IArgumentMatcher doesn't work as expected
Release notes
Open source →New Features
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.
Changes
#308 - Unable to use PHP8 named arguments on static method
#307 - Phake\Matchers\IArgumentMatcher doesn't work as expected
-
v4.2.030 Nov 2021Release notes
Open source →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 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
neveris called, Phake will by default throw aPhake\Exception\NeverReturnMethodCalledExceptionexception. CallingPhake::when($mock)->thenReturn($x)will have no effect on this method result.Changes
#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. -
v4.2.0-RC127 Nov 2021 pre-releaseNothing published for this version
-
v4.1.024 Apr 2021Nothing published for this version
-
v4.0.027 Mar 2021Nothing published for this version
-
v3.1.910 May 2021Nothing published for this version
-
v3.1.811 May 2020Nothing published for this version
-
v3.1.706 Dec 2019Nothing published for this version
-
v3.1.606 Jun 2019Nothing published for this version
-
v3.1.524 May 2019Nothing published for this version
-
v3.1.424 May 2019Nothing published for this version
-
v3.1.304 Aug 2018Nothing published for this version
-
v3.1.226 Jul 2018Nothing published for this version
-
v3.1.105 Jul 2018Nothing published for this version
-
v3.1.003 Jul 2018Nothing published for this version
-
v3.0.106 Sep 2017Nothing published for this version
-
v3.0.004 Jul 2017Nothing published for this version
-
v2.3.220 Mar 2017Nothing published for this version
-
v2.3.116 Mar 2017Nothing published for this version
-
v2.3.004 Mar 2016Nothing published for this version
-
v2.2.114 Feb 2016Nothing published for this version
-
v2.2.030 Nov 2015Nothing published for this version
-
v2.1.103 Sep 2015Nothing published for this version
-
v2.1.009 May 2015Nothing published for this version
-
v2.0.221 Mar 2015Nothing published for this version
-
v2.0.104 Mar 2015Nothing published for this version
-
V2.0.023 Feb 2015Nothing published for this version
-
v2.0.0-rc123 Feb 2015 pre-releaseNothing published for this version
-
v2.0.0-beta527 Jan 2015 pre-releaseNothing published for this version
-
v2.0.0-beta426 Jan 2015 pre-releaseNothing published for this version
-
v2.0.0-beta326 Jan 2015 pre-releaseNothing published for this version
-
v2.0.0-beta205 May 2014 pre-releaseNothing published for this version
-
v2.0.0-beta119 Apr 2014 pre-releaseNothing published for this version
-
v2.0.0-alpha406 Aug 2013 pre-releaseNothing published for this version
-
v2.0.0-alpha306 Aug 2013 pre-releaseNothing published for this version
-
v2.0.0-alpha217 Jul 2013 pre-releaseNothing published for this version
-
v2.0.0-alpha106 Apr 2013 pre-releaseNothing published for this version
-
v1.0.827 Jan 2015Nothing published for this version
-
v1.0.726 Jan 2015Nothing published for this version
-
v1.0.626 Jan 2015Nothing published for this version
-
v1.0.516 Apr 2014Nothing published for this version
-
v1.0.406 Apr 2014Nothing published for this version
-
v1.0.314 May 2012Nothing published for this version