Skip to content

0.15.0

Latest

Choose a tag to compare

@jreviews jreviews released this 11 Apr 01:15

What's Changed

Added

  • Yoyo.dispatch() and Yoyo.dispatchTo() JS API for triggering component events from JavaScript, matching Livewire 3's dispatch API. Thanks to @mucan54 for the original proposal in #35.
  • Named parameter support for JS dispatch — object params like { postId: 2 } map to listener method arguments by name.
  • Required parameter validation for named dispatch params — throws InvalidArgumentException if a required parameter is missing.
  • Documentation for all HTMX response header methods available via $this->response (retarget, reswap, reselect, pushUrl, replaceUrl, location, redirect, refresh, trigger, triggerAfterSwap, triggerAfterSettle).

Fixed

  • Fix test_json empty-params decode bug when eventParams is an empty JSON object.
  • Add defensive null-guard in triggerServerEmittedEvent to prevent TypeError when source element is not inside a component.

Performance

  • Add static cache to getMethodParametersWithTypes() for consistency with other ClassHelpers caches.
  • Optimize props filtering in YoyoCompiler by replacing repeated in_array checks with a lookup map.
  • Skip re-processing already compiled nested Yoyo child components during compile.

Full Changelog: 0.14.0...0.15.0