From 5293f0b24842a0b571c9f37db3bcba056ec362ed Mon Sep 17 00:00:00 2001 From: Bart Jaskulski <bjaskulski@protonmail.com> Date: Tue, 1 Oct 2024 00:47:47 +0200 Subject: [PATCH] chore: add changelog entries Signed-off-by: Bart Jaskulski <bjaskulski@protonmail.com> --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7414ca8..ef6e5a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # wp-init changelog +## [Unreleased] +### Added +- Dependency injection container compilation on first request. +- Integration with `wpdesk/wp-wpdesk-license`, enabled when library is available. +- Hook definitions can now include optional `priority` parameter, which defines the order of hooking into WordPress. This may be useful, when result of one action would prevent other actions from execution. Example: +```php +return [ + ClassRequiringWooCommerce::class, + 'plugins_loaded' => [ + OtherClassRequiringWooCommerce::class + ], + [ + // This will be hooked first, and may possibly terminate the rest of the hooks. + 'priority' => -100, + 'handler' => CheckIfWooCommerceAvailable::class + ], +]; +``` +### Removed +- Removed `wpinit` command. Previously it served as a tool to compile static resources, like plugin info. This functionality have been removed in favor of runtime compilation on client's side. +### Changed +- Enabling legacy mode requires verbosely activating that in configuration with `'legacy' => true`. +- `wp-init` now requires PHP >=7.4. +- Handlers for hook definitions are now grouped by calling hook and flushed late. Previously, each definition was hooked on itself, what might lead to a lot `add_action` calls. +### Fixed +- Improved integration with `wpdesk/wp-logs` and `wpdesk/wp-wpdesk-tracker`. +- Hook definitions are now resolved inside `plugins_loaded` hook to avoid classes not found when integrating with 3rd party code. + ## [0.9.1] - 2024-08-13 ### Fixed - Fixed loading bindings. -- GitLab