Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Latest commit

 

History

History
52 lines (30 loc) · 3.03 KB

CHANGELOG.md

File metadata and controls

52 lines (30 loc) · 3.03 KB

Release Notes

Added

  • Support for custom event payloads. Object events can now define a payload() method which is used then instead of the object itself when dispatching the event. Fixes issue #9.

Updated

  • You now need to pass the vendor directory into the setUpWp() method when using the BetterWpHooksTestCase.

Fixed

  • BetterWpHooksTestCase looked for the bootstrap file in the wrong directory.

Added

  • Added better-wordpress-hook-api-clone to dependencies instead of dev-dependencies.
  • Added an optional parameter to pass a custom file path into the setUpWp() method when using the testing module

Added

  • Update dependency on calvinalkan/interfaces to 0.1.2. The ContainerAdapter Interface now required a method implementation() to get the underlying container implementation of the adapter.

Added

  • Added release notes.
  • Added new documentation for Release 0.1.4

Added

  • Smart default values - You can now typehint the return value on your event's default() method. If the typehint does not match with the filtered value the default() method will get called with the original and filtered value. (Usage)(Commit)
  • It's now possible to resolve mapped events from the service container (Commit). See example under Bootstrapping.

Changed

  • It's now possible to dispatch event objects without having to pass an empty array for events without constructor arguments.(Commit)
  • the default() method now receives the original payload, and the filtered value. (Commit)

Fixed

  • Some docblocks mistakes that led to false positive errors in code editors.
  • Logic error. Removed code that attempted to map several custom events to a WordPress Hook. This should have never been possible. Only one custom event should be mapped to a WordPress Hook.