You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,28 @@
1
1
# Changelog
2
2
3
+
## [4.0.1] - 2026-04-09
4
+
5
+
### Added
6
+
7
+
-**Auto-publish.** New `auto_publish` config key in `session_manager` section. When enabled, the daemon automatically calls `publish()` for sessions with active subscriptions and dispatches PSR-14 events (`DataChangeReceived`, `EventNotificationReceived`, `AlarmActivated`, etc.) to Laravel's event system. No manual publish loop required — register listeners in your `EventServiceProvider` to handle notifications.
8
+
-**Per-connection auto-connect.** New `auto_connect` config key per connection. When `true` (and `auto_publish` is enabled), the daemon auto-connects to the endpoint on startup and registers the subscriptions defined in the new `subscriptions` config key. Connections without `auto_connect` are managed imperatively as before.
9
+
-**Declarative subscription config.** New `subscriptions` config key per connection. Define `monitored_items` and `event_monitored_items` directly in `config/opcua.php` — the daemon creates them automatically on startup. Each subscription supports `publishing_interval`, `max_keep_alive_count`, `lifetime_count`, `priority`, and per-item `sampling_interval`, `queue_size`, `client_handle`, `select_fields`.
10
+
-**Event dispatcher injection into daemon.**`SessionCommand` resolves `EventDispatcherInterface` from the Laravel container and passes it to the daemon. All OPC UA client events (47 events) are dispatched through Laravel's event system when auto-publish is active.
11
+
-`SessionCommand::buildAutoConnectConfig()` — reads connections with `auto_connect: true` and builds the daemon's auto-connect configuration.
12
+
-`SessionCommand::mapToDaemonConfig()` — maps Laravel connection config keys (`security_policy`, `timeout`, `client_certificate`, etc.) to the daemon's internal format (`securityPolicy`, `opcuaTimeout`, `clientCertPath`, etc.).
13
+
-`SessionCommand::resolveEventDispatcher()` — resolves `EventDispatcherInterface` from the Laravel container.
14
+
-`SessionCommand::resolveSecurityPolicyUri()` and `resolveSecurityModeValue()` — helper methods for security config mapping.
15
+
- New `.env` variable: `OPCUA_AUTO_PUBLISH`.
16
+
- Auto-publish status displayed in the `opcua:session` startup table.
17
+
- Auto-connect summary displayed before daemon startup when connections are configured.
18
+
- Unit tests for `buildAutoConnectConfig`, `mapToDaemonConfig`, auto-publish flag passing, event dispatcher resolution, auto-connect filtering.
19
+
- New documentation: [Auto-Publish & Monitoring](doc/10-auto-publish.md) with real-world industrial use case.
20
+
21
+
### Changed
22
+
23
+
- Updated dependency `php-opcua/opcua-session-manager` from `^4.0.0` to `^4.0.3` (required for auto-publish and auto-connect support).
24
+
-`SessionCommand::createDaemon()` now accepts `?EventDispatcherInterface $clientEventDispatcher` and `bool $autoPublish` parameters.
0 commit comments