PackageTrack
Sign in Get early access

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 2026
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 52
  1. v4.7.0 10 Feb 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v4.6.2...v4.7.0

    Open source →
    Release notes

    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()) and Phake::verify($mock)->foo by Phake::verify($mock)->foo(Phake::anyParameters()).

    Open source →
  2. v4.6.2 25 Nov 2025
    Release notes

    Remove PHP8.5 deprecation notices

    Open source →
  3. v4.6.1 11 Mar 2025

    Nothing published for this version

  4. v4.6.0 10 Feb 2025
    Release notes

    New Feature

    #326 Add support for Comparator 7 / PHPUnit 12

    Open source →
  5. v4.5.3 09 Dec 2024

    Nothing published for this version

  6. v4.5.2 28 Nov 2024

    Nothing published for this version

  7. v4.5.1 11 Oct 2024
    Release notes Open source →
  8. v4.5.0 05 Mar 2024
    Release notes

    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

    Open source →
    Release notes

    New Feature

    #320 Add support for Comparator 6 / PHPUnit 11

    Open source →
  9. v4.4.0 10 Feb 2023
    Release notes

    New Feature

    #312 Add support for Comparator 5 / PHPUnit 10

    Open source →
    Release notes

    New Feature

    #312 Add support for Comparator 5 / PHPUnit 10

    Open source →
  10. v4.3.0 13 Dec 2022
    Release notes

    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

    Open source →
    Release notes

    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

    Open source →
  11. v4.2.0 30 Nov 2021
    Release notes

    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 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.

    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.

    Open source →
  12. v4.2.0-RC1 27 Nov 2021 pre-release

    Nothing published for this version

  13. v4.1.0 24 Apr 2021

    Nothing published for this version

  14. v4.0.0 27 Mar 2021

    Nothing published for this version

  15. v3.1.9 10 May 2021

    Nothing published for this version

  16. v3.1.8 11 May 2020

    Nothing published for this version

  17. v3.1.7 06 Dec 2019

    Nothing published for this version

  18. v3.1.6 06 Jun 2019

    Nothing published for this version

  19. v3.1.5 24 May 2019

    Nothing published for this version

  20. v3.1.4 24 May 2019

    Nothing published for this version

  21. v3.1.3 04 Aug 2018

    Nothing published for this version

  22. v3.1.2 26 Jul 2018

    Nothing published for this version

  23. v3.1.1 05 Jul 2018

    Nothing published for this version

  24. v3.1.0 03 Jul 2018

    Nothing published for this version

  25. v3.0.1 06 Sep 2017

    Nothing published for this version

  26. v3.0.0 04 Jul 2017

    Nothing published for this version

  27. v2.3.2 20 Mar 2017

    Nothing published for this version

  28. v2.3.1 16 Mar 2017

    Nothing published for this version

  29. v2.3.0 04 Mar 2016

    Nothing published for this version

  30. v2.2.1 14 Feb 2016

    Nothing published for this version

  31. v2.2.0 30 Nov 2015

    Nothing published for this version

  32. v2.1.1 03 Sep 2015

    Nothing published for this version

  33. v2.1.0 09 May 2015

    Nothing published for this version

  34. v2.0.2 21 Mar 2015

    Nothing published for this version

  35. v2.0.1 04 Mar 2015

    Nothing published for this version

  36. V2.0.0 23 Feb 2015

    Nothing published for this version

  37. v2.0.0-rc1 23 Feb 2015 pre-release

    Nothing published for this version

  38. v2.0.0-beta5 27 Jan 2015 pre-release

    Nothing published for this version

  39. v2.0.0-beta4 26 Jan 2015 pre-release

    Nothing published for this version

  40. v2.0.0-beta3 26 Jan 2015 pre-release

    Nothing published for this version

  41. v2.0.0-beta2 05 May 2014 pre-release

    Nothing published for this version

  42. v2.0.0-beta1 19 Apr 2014 pre-release

    Nothing published for this version

  43. v2.0.0-alpha4 06 Aug 2013 pre-release

    Nothing published for this version

  44. v2.0.0-alpha3 06 Aug 2013 pre-release

    Nothing published for this version

  45. v2.0.0-alpha2 17 Jul 2013 pre-release

    Nothing published for this version

  46. v2.0.0-alpha1 06 Apr 2013 pre-release

    Nothing published for this version

  47. v1.0.8 27 Jan 2015

    Nothing published for this version

  48. v1.0.7 26 Jan 2015

    Nothing published for this version

  49. v1.0.6 26 Jan 2015

    Nothing published for this version

  50. v1.0.5 16 Apr 2014

    Nothing published for this version

  51. v1.0.4 06 Apr 2014

    Nothing published for this version

  52. v1.0.3 14 May 2012

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive