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 2026Releases
latest 32-
2.7.005 Feb 2026Release notes
Open source →Added
- The function mocks for
has_filter()andhas_action()now support the$priorityparameter 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 ofdoing_action(),doing_filter(),do_action_deprecated(),apply_filters_deprecated(),has_filter()andhas_action().
Full Changelog: 2.6.2...2.7.0
- The function mocks for
-
2.6.229 Aug 2024Release notes
Open source →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_booleantest assertions by @paulshryock - Stub
_n_noop,_nx_noop,translate_nooped_pluralby @gmazzap - PHP 8.4 Compatibility by @jrfnl
Full Changelog: 2.6.1...2.6.2
-
2.6.111 Nov 2021Release notes
Open source →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
-
2.6.013 Oct 2020Release notes
Open source →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)
- Added stub for
-
2.5.009 Oct 2020 -
2.4.205 Oct 2020Release notes
Open source →Added
Nothing
Changed
- Moved CI from Travis to GitHub actions
- Moved PHPUnit cross-version helpers (by @jrfnl) from single tests to their
UnitTestCaseparent class
Fixed
Nothing
-
2.4.104 Oct 2020Release notes
Open source →Added
Nothing.
Changed
- Improved Documentation
- Updated DealerDirect Composer plugin props @jrfnl
Fixed
Nothing.
-
2.4.024 Nov 2019Release notes
Open source →Added
- Stubs for
do_action_deprecatedandapply_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
- Stubs for
-
2.3.126 Jul 2019Release notes
Open source →Added
- Nothing
Changed
- Nothing
Fixed
byDefaultneeds to be allowed for functions expectations
-
v2.3.022 Jul 2019Release notes
Open source →Added
Actions\expectRemovedandFilters\expectRemoved(see #45)Functions\stubTranslationFunctions()Functions\stubEscapeFunctions()- Pre-defined stubs for
is_wp_error()andabsint - 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
@throwsoccurrences
Fixed
- Minor tests issues
- End-of-line inconsistencies
-
2.2.115 Mar 2019Nothing published for this version
-
2.2.001 Dec 2017Nothing published for this version
-
2.1.028 Sep 2017Nothing published for this version
-
2.0.329 Aug 2017Nothing published for this version
-
2.0.203 Jun 2017Nothing published for this version
-
2.0.129 May 2017Nothing published for this version
-
2.0.024 May 2017Nothing published for this version
-
1.5.002 Jun 2017Nothing published for this version
-
1.4.217 Nov 2016Nothing published for this version
-
1.4.114 Oct 2016Nothing published for this version
-
1.4.016 Jun 2016Nothing published for this version
-
1.3.228 Mar 2016Nothing published for this version
-
1.3.119 Feb 2016Nothing published for this version
-
1.3.019 Feb 2016Nothing published for this version
-
1.2.112 Jul 2015Nothing published for this version
-
1.2.028 May 2015Nothing published for this version
-
1.1.414 May 2015Nothing published for this version
-
1.1.313 May 2015Nothing published for this version
-
1.1.213 May 2015Nothing published for this version
-
1.1.124 Mar 2015Nothing published for this version
-
1.1.024 Mar 2015Nothing published for this version
-
1.0.024 Mar 2015Nothing published for this version