PackageTrack
Sign in Get early access

brain/monkey

Mocking utility for PHP functions and WordPress plugin API

2.7.0 16M downloads/mo #775 most downloaded on Packagist Brain-WP/BrainMonkey

What this package is like to depend on

Last release 6 months ago

05 Feb 2026

Release timing varies

gaps range from 9 days to 2.8 years

Some releases are documented

notes for 10 of 32 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

32 releases · first in 2015

1 release in the last 12 months

see the full history below

Release timeline

32 releases · Mar 2015 to Feb 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 32
  1. 2.7.0 05 Feb 2026
    Release notes

    Added

    • The function mocks for has_filter() and has_action() now support the $priority parameter as added in WordPress 6.9 by @jrfnl.

    Changed

    • Composer: the version constraints for Mockery have been tightened up by @jrfnl.
    • Confirmed compatibility with PHP 8.4 and 8.5.
    • The package as distributed will no longer contain dev-only files by @jrfnl.
    • Various housekeeping, including improvements to the tests, documentation and CI.

    Fixed

    • Default values for some parameters in function mocks for WP have been aligned with WP Core by @jrfnl.
      This fixes a few situations where WP Core would allow for not passing a parameter, while BrainMonkey did not, or would expect a different default value when skipping a parameter.
      In particular, this affects the function mocks of doing_action(), doing_filter(), do_action_deprecated(), apply_filters_deprecated(), has_filter() and has_action().

    Full Changelog: 2.6.2...2.7.0

    Open source →
  2. 2.6.2 29 Aug 2024
    Release notes

    Changed

    • Several updates and improvements on GH Actions, by @jrfnl
    • Add dependabot configuration file by @jrfnl
    • WP Helper functions: ensure parameter names are in line with WP Core by @jrfnl
    • Predefined functions enhancements by @gmazzap

    Added

    • Add wp_validate_boolean test assertions by @paulshryock
    • Stub _n_noop, _nx_noop, translate_nooped_plural by @gmazzap
    • PHP 8.4 Compatibility by @jrfnl

    Full Changelog: 2.6.1...2.6.2

    Open source →
  3. 2.6.1 11 Nov 2021
    Release notes

    Added

    • Compatibility with PHP 8.1 (props @jrfnl)

    Changed

    • Improved QA GitHub action workflow for speed, robustness, compat with PHP 8.1, and start testing for PHP 8.2 (props @jrfnl)
    • Improved doc-block for Filters\has (props @shvlv)
    • Improved documentation for added hooks (props @Idealien)

    Fixed

    • Allow for fully-qualified parameter type declarations (props @tfrommen)
    • Fixed ClosureParamStringForm compat with PHP 5.6 (props @jrfnl)
    Open source →
  4. 2.6.0 13 Oct 2020
    Release notes

    Added

    • Added stub for esc_xml(), wp_json_encode, user_trailingslashit(), _n, and _nx (props @jrfnl)

    Docs

    • Fix docs for has_action/has_filters (props @coreyworrell)
    • Document newly stubbed WP functions (props @jrfnl)
    Open source →
  5. 2.5.0 09 Oct 2020
    Release notes

    Added

    • HooksStorage::hookPriority (internal)

    Changed

    • has_filter / has_action return true instead of the added priotity. (See #79 props @widoz)

    Fixed

    • See Changed
    Open source →
  6. 2.4.2 05 Oct 2020
    Release notes

    Added

    Nothing

    Changed

    • Moved CI from Travis to GitHub actions
    • Moved PHPUnit cross-version helpers (by @jrfnl) from single tests to their UnitTestCase parent class

    Fixed

    Nothing

    Open source →
  7. 2.4.1 04 Oct 2020
    Release notes

    Added

    Nothing.

    Changed

    • Improved Documentation
    • Updated DealerDirect Composer plugin props @jrfnl

    Fixed

    Nothing.

    Open source →
  8. 2.4.0 24 Nov 2019
    Release notes

    Added

    • Stubs for do_action_deprecated and apply_filters_deprecated

    Changed

    • Improved Travis workflow, including PHP cross-version compatibility, props @jrfnl
    • Added codecov.io to Travis
    • Improved PHPUnit compatibility across PHP versions, props @jrfnl

    Fixed

    • Fixed logic bug in HookStorage::parseArgsToAdd, props @szepeviktor
    • Fix implode argument order (PHP 7.4 compatibility fix), props @jrfnl
    • Many code styling fixes and cleanup, props @jrfnl
    Open source →
  9. 2.3.1 26 Jul 2019
    Release notes

    Added

    • Nothing

    Changed

    • Nothing

    Fixed

    • byDefault needs to be allowed for functions expectations
    Open source →
  10. v2.3.0 22 Jul 2019
    Release notes

    Added

    • Actions\expectRemoved and Filters\expectRemoved (see #45)
    • Functions\stubTranslationFunctions()
    • Functions\stubEscapeFunctions()
    • Pre-defined stubs for is_wp_error() and absint
    • Default params handling for added and removed hooks
    • Tests for new features
    • Basic functional tests
    • Docs for new features

    Changed

    • Re-structured tests folder and test suites
    • Deleted bootstrap file and rely on autoload-dev only
    • Improved base test class
    • Docs improvements in various files (ses #49)
    • Improved various doc blocks and removed all @throws occurrences

    Fixed

    • Minor tests issues
    • End-of-line inconsistencies
    Open source →
  11. 2.2.1 15 Mar 2019

    Nothing published for this version

  12. 2.2.0 01 Dec 2017

    Nothing published for this version

  13. 2.1.0 28 Sep 2017

    Nothing published for this version

  14. 2.0.3 29 Aug 2017

    Nothing published for this version

  15. 2.0.2 03 Jun 2017

    Nothing published for this version

  16. 2.0.1 29 May 2017

    Nothing published for this version

  17. 2.0.0 24 May 2017

    Nothing published for this version

  18. 1.5.0 02 Jun 2017

    Nothing published for this version

  19. 1.4.2 17 Nov 2016

    Nothing published for this version

  20. 1.4.1 14 Oct 2016

    Nothing published for this version

  21. 1.4.0 16 Jun 2016

    Nothing published for this version

  22. 1.3.2 28 Mar 2016

    Nothing published for this version

  23. 1.3.1 19 Feb 2016

    Nothing published for this version

  24. 1.3.0 19 Feb 2016

    Nothing published for this version

  25. 1.2.1 12 Jul 2015

    Nothing published for this version

  26. 1.2.0 28 May 2015

    Nothing published for this version

  27. 1.1.4 14 May 2015

    Nothing published for this version

  28. 1.1.3 13 May 2015

    Nothing published for this version

  29. 1.1.2 13 May 2015

    Nothing published for this version

  30. 1.1.1 24 Mar 2015

    Nothing published for this version

  31. 1.1.0 24 Mar 2015

    Nothing published for this version

  32. 1.0.0 24 Mar 2015

    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