Skip to content

Releases: magdicom/hooks

v2.0.0-beta.2

v2.0.0-beta.2 Pre-release
Pre-release

Choose a tag to compare

@magdicom magdicom released this 09 Sep 17:09

Hooks v2.0.0-beta.2 is a breaking beta for the 2.0 line. It requires PHP 8.2+ and is installed with:

composer require magdicom/hooks:"^2.0@beta"

Read the migration guide before upgrading: https://github.com/magdicom/hooks/blob/2.0/UPGRADE.md

Highlights:

  • Public beta namespaces are now organized under Magdicom\Exceptions, Magdicom\Processors, and Magdicom\Resolvers. No beta-1 compatibility aliases or shims are included.
  • Added one-off collector finalization with processWith() and renderWith(). These collect raw listener results exactly once, support resolver-backed class names, and leave persistent processor/renderer configuration unchanged.
  • Removed the legacy mutable debugging/source-file API: debug(), setSourceFile(), and getSourceFile().
  • Improved Composer metadata and README positioning around Hooks — Extension points for PHP. Complete documentation: https://hooks.momagdi.com
  • Removed the Dependabot auto-merge workflow so dependency PRs remain reviewable.

The Laravel wrapper has not yet been migrated or integration-tested against this beta. Please report beta issues through GitHub Issues: https://github.com/magdicom/hooks/issues

v2.0.0-beta.1

v2.0.0-beta.1 Pre-release
Pre-release

Choose a tag to compare

@magdicom magdicom released this 07 Sep 10:31

magdicom/hooks v2.0.0-beta.1 is the first prerelease of the version 2 line.

Version 2 is intentionally breaking. It removes the version-1 legacy dispatch APIs, global parameter state, shared output state, and output helpers. The replacement API separates hook behavior explicitly:

  • actions for side effects
  • filters for sequential transformations
  • collectors for obtaining callback results

Install the beta with:

composer require magdicom/hooks:"^2.0@beta"

Requirements:

  • PHP 8.2 or newer

Highlights:

  • explicit actions, filters, and collectors
  • deterministic priorities and listener snapshots during dispatch
  • instance-owned registration handles
  • variadic invocation arguments
  • framework-neutral resolver support for non-static class callbacks and class-name processors/renderers
  • collector processors and renderers
  • built-in concatenate, first, first-non-null, last, flatten, merge, boolean-AND, and boolean-OR processing
  • removal of version-1 legacy APIs and global output state

Upgrade notes:

  • Read the migration guide before upgrading: https://github.com/magdicom/hooks/blob/2.0/UPGRADE.md
  • collect() executes all collector callbacks and returns raw one-entry-per-callback results.
  • process() and render() use configured collector processors/renderers after raw collection.

The Laravel wrapper has not yet been migrated or integration-tested against this beta.

Please report beta issues through GitHub Issues: https://github.com/magdicom/hooks/issues

v1.1.0

Choose a tag to compare

@magdicom magdicom released this 12 Jan 08:03

Added debug functionality

v1.0.4

Choose a tag to compare

@magdicom magdicom released this 02 Jan 23:13
  • accept an object as action hook parameter

v1.0.3

Choose a tag to compare

@magdicom magdicom released this 31 Dec 02:05
  • improve output handling

v1.0.2

Choose a tag to compare

@magdicom magdicom released this 31 Dec 01:32
  • improved output handling

v1.0.1

Choose a tag to compare

@magdicom magdicom released this 29 Dec 10:58
Update CHANGELOG

v1.0.0

Choose a tag to compare

@magdicom magdicom released this 29 Dec 07:17
  • initial release