Skip to content

Releases: Brain-WP/BrainMonkey

v2.2.0

01 Dec 16:39
Compare
Choose a tag to compare

Fixed

Nothing

Changed

  • Mockery is now allowed in version range >=0.9 < 0.2. Mockery v1 is compatibe with BM itself, and if it breaks something in the package using BM, it will always be possible restrict the requirement there.

Added

Nothing

v2.1.0

29 Sep 06:14
Compare
Choose a tag to compare

Fixed

  • Compatibility with PHPUnit and Patchwork on autoload.

Changed

  • The file patchwork-loader.php which loads Patchwork, is not loaded from Composer autoload, but manually on setUp() or on first container instantiation, based on what occurs first.

Added

  • Functions\stubs() API method for multiple function definitions.

v2.0.3

29 Aug 09:21
Compare
Choose a tag to compare

Fixed

Nothing

Changed

  • Patchwork is now allowed in 2.* version (was 2.0.*).

Added

Nothing

v2.0.2

29 May 13:47
Compare
Choose a tag to compare

Fixed

  • Improved apply_filters behavior to fix 100% of cases in #16

Changed

Nothing

Added

Nothing

v1.5.0

02 Jun 11:14
Compare
Choose a tag to compare

Fixed

Nothing

Changed

  • Updated Patchwork to version 2

Added

Nothing

v2.0.0

24 May 15:12
Compare
Choose a tag to compare

Changed

  • [BREAKING] API entry-points are now functions and not methods (also Actions::expectFired() is now Actions\expectDone())
  • [BREAKING] Setup workflow (see https://brain-wp.github.io/BrainMonkey/docs/functions-setup.html and https://brain-wp.github.io/BrainMonkey/docs/wordpress-setup.html)
  • [BREAKING] Default "times" expectation is changed from Mockery default ->zeroOrMoreTimes() to ->atLeast()->once()
  • [BREAKING] Closure string representation that can be used with has_filter / has_action is now changed to include closure arguments and distinguish normal closures from static closures
  • Relaxed callable check: function that requires callable arguments (like add_action / add_filter), does not throw exception if the given supposed-to-be callable is not available (e.g. not mocked function or not loaded class)
  • Updated Patchwork to version 2

Added

Fixed

  • Adding expectations for added filters without returning argument expectation does not break apply_filters default behavior. See #16

Migrating from v1 guide available here: https://brain-wp.github.io/BrainMonkey/docs/migrating-from-v1.html

v1.4.2

17 Nov 19:00
Compare
Choose a tag to compare

Fixed

  • has_action() / has_filter() can now be called with just hook name and they will return true if the given hook has any callback attached (just like they work in core). See #18

Changed

Nothing

Added

Nothing

v1.4.1

14 Oct 15:27
Compare
Choose a tag to compare

Fixed

  • did_action() / Filters::apllied() now works with hooks that contain special chars

Changed

Nothing

Added

Nothing

v1.4.0

16 Jun 11:12
Compare
Choose a tag to compare

Fixed

  • Hooks::sanitizeHookName() is a static function that was called dynamically

Changed

  • When an undefined function is required to be mocked, it was defined with no body, now it triggers a fatal error if not replaced. See #13

Added

  • CI tests are run for PHP 7

v1.3.2

28 Mar 21:04
Compare
Choose a tag to compare

Fixed

  • Both actions and filters can now be tested for same hook be fired / added more than once with different arguments. See #11

Added

  • PHP requirement (>=5.4) in composer.json

Changed

nothing