Releases: magdicom/hooks
Release list
v2.0.0-beta.2
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, andMagdicom\Resolvers. No beta-1 compatibility aliases or shims are included. - Added one-off collector finalization with
processWith()andrenderWith(). 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(), andgetSourceFile(). - 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
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()andrender()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