symfony-opcua · v4.4.x · changelog

Changelog

[4.4.0] - 2026-06-08

Lock-step release with php-opcua/opcua-client v4.4.0 and php-opcua/opcua-session-manager v4.4.0. The Symfony bundle is a thin DI wrapper over the core client — OpcuaManager::connect() returns the underlying OpcUaClientInterface directly, so every method the core added in v4.4 is reachable immediately without bundle-side changes.

Changed

  • Bumped php-opcua/opcua-client ^4.3.0^4.4.0.
  • Bumped php-opcua/opcua-session-manager ^4.3.1^4.4.0.
  • Bumped CI test-server suite from uanetstandard-test-suite@v1.1.0 to @v1.5.0 (adds HTTPS Binary on :4852, the Security Key Service on :4851, ECC NIST / Brainpool servers on :4848 / :4849, and the open62541-backed historizing server on :24842 that the new HistoryUpdate integration tests target).

Removed

  • Dropped Symfony 7.3 support. The Symfony constraint was raised from ^7.3|^8.0 to ^7.4|^8.0 across every symfony/* requirement (runtime and require-dev), and 7.3.* was removed from the CI unit and integration matrices (now 7.4.* / 8.0.*). The reason is that Symfony 7.3 reached end of life and no longer receives security fixes — see PKSA-z7t6-zt6p-wtng. Keeping a constraint that resolves to an unmaintained Symfony release would expose downstream applications to unpatched advisories. Badges, READMEs, the docs site, the llms*.txt digests, and the AI skill metadata were updated to reflect the 7.4 floor. Action required: applications still on Symfony 7.3 must upgrade to 7.4 or 8.x before taking this release.

Inherited from opcua-client v4.4.0

Available immediately through every OpcUaClientInterface instance returned by OpcuaManager::connect() — no bundle code change required:

  • HistoryUpdate — 9 new methods on OpcUaClientInterface covering Insert / Replace / Update / Remove for both data and event timeseries (Part 11 §6.9). Reachable as $client->historyInsertData(...), $client->historyReplaceData(...), etc.
  • FileTransferModule — OPC UA Part 5 file transfer service set (Open / Read / Write / Close / GetPosition / SetPosition on FileType nodes plus FileDirectoryType helpers). Reachable as $client->openFile(...), $client->createDirectory(...), etc.
  • AggregateModule — client-side Part 13 aggregate computation (Interpolate, Minimum, Maximum, Average, Count) on a raw DataValue[] buffer. Reachable as $client->aggregate(...) / $client->historyAggregate(...) (the core exposes these via Client::__call()).
  • ClientTransportInterface — wire transport became pluggable. Companion packages opcua-client-ext-reverse-connect and opcua-client-ext-transport-https plug into the same seam. The bundle constructs its Client instances with the default TCP transport — wiring an alternative transport is out of scope for v4.4.0 and is tracked for a future release.
  • 5 new PSR-14 events (HistoryDataUpdated, HistoryDataDeleted, HistoryEventUpdated, HistoryEventDeleted, AggregateComputed) plus 4 new File Transfer events (FileOpened, FileClosed, FileBytesRead, FileBytesWritten). Reachable through any Symfony EventDispatcherInterface you wire into the bundle's event_dispatcher config key.

Inherited from opcua-session-manager v4.4.0

When session_manager.socket_path resolves to a running daemon, the bundle hands out ManagedClient instances. ManagedClient in v4.4.0 surfaces 21 explicit typed wrappers around the new core methods, so IDE autocomplete and static analysis see them the same way they see read / write / browse.

Compatibility

  • No application-side changes required. Existing code calling methods on the client returned by OpcuaManager::connect() keeps working unchanged. The new methods are purely additive.
  • No bundle code changes. OpcuaServiceProvider, OpcuaExtension, Configuration, and the compiler pass are unchanged. The config schema is unchanged.
  • No DI changes. Service IDs and aliases are the same as v4.3.
  • Daemon ↔ application version skew. A v4.4 application against a v4.3 daemon raises BadMethodCallException from the IPC layer when the application calls one of the 21 new methods — the older daemon's describe does not advertise them. Upgrade order: daemon first.

[4.3.0] - 2026-05-15

Added

  • Per-connection log_channel config key — Monolog channel name resolved lazily at runtime, no Monolog reference needed in config files.
  • OpcuaManager::setLogger(LoggerInterface) runtime override (best-effort propagation to existing connections).
  • OpcuaManager::useConsoleLogger(OutputInterface, …, ?string $dateFormat = 'Y-m-d H:i:s.v') — Symfony ConsoleLogger wrapped with millisecond timestamp by default; pass dateFormat: null to disable.
  • OpcuaManager::getLogger().
  • Logging\TimestampedLogger — generic PSR-3 decorator that prepends a formatted timestamp.
  • Logging\LoggerResolverFactory + bundle-side ServiceLocator wiring that maps configured channels to monolog.logger.<channel> references.

Changed

  • OpcuaManager::__construct gained an optional ?\Closure $loggerResolver parameter (5th, default null, BC-safe).
  • Logger resolution priority: runtime override → config 'logger' → config 'log_channel' → default logger.
  • Bumped php-opcua/opcua-client ^4.2.0^4.3.0 and php-opcua/opcua-session-manager ^4.2.0^4.3.1. Notable downstream impact:
    • NodeManagementModule is back in the default module list — addNodes() / deleteNodes() / addReferences() / deleteReferences() reachable through the manager. Servers without the service set raise ServiceUnsupportedException on first call (still a subclass of ServiceException, existing handlers keep matching).
    • Top-level ServiceFault now decodes to ServiceException instead of the misleading EncodingException: Buffer underflow.
    • Wire-format compliance fixes: RequestHeader.timestamp is a valid UtcTime, anonymous policyId discovered for all security modes, NodeManagement TypeIds reference DefaultBinary encoding, ECC sequence numbers per OPC UA 1.05.4. Servers stricter than UA-.NETStandard (open62541 etc.) are now reachable.
    • Cache codec breaking change — persistent caches must be flushed on upgrade. unserialize() removed from every cache code path; WireCacheCodec (JSON gated by allowlist) is the new default. Pre-v4.3 entries are silently discarded on first access. New ClientBuilder::setCacheCodec() is available if you need to override.
    • Daemon: --version flag, umask(0077) around bind closes the socket-permission race, NDJSON 64 KiB per-frame cap, IPv4-mapped IPv6 loopback handled, username no longer leaked via list, Windows path / URL redaction in error messages, conservative PID-check fallback.
    • Daemon: Unix-socket path length is now validated before bind — long paths get a clear DaemonException instead of a confusing chmod(): No such file or directory after silent kernel truncation.

Tests

  • +22 unit tests.

[4.2.0] - 2026-04-17

Changed

  • Bumped php-opcua/opcua-client from ^4.1.1 to ^4.2.0 and php-opcua/opcua-session-manager from ^4.1 to ^4.2.0. Picks up the Kernel + ServiceModule architecture, the Wire-serialization pipeline, the describe/invoke IPC commands that make third-party modules reachable through ManagedClient::__call(), and the cross-platform IPC transport (Unix socket on Linux/macOS, TCP loopback on Windows).

Added

  • Cross-platform session manager out of the box. php_opcua_symfony_opcua.session_manager.socket_path now accepts:

    • unix://<path> (explicit Unix-domain socket)
    • tcp://127.0.0.1:<port> (loopback-only — non-loopback hosts are refused by TcpLoopbackTransport on the client and by SessionManagerDaemon on the daemon)
    • scheme-less path (interpreted as unix://<path>, backwards-compatible with pre-v4.2.0 configs)

    OpcuaManager::isSessionManagerRunning() and OpcuaManager::shouldUseSessionManager() now inspect the endpoint URI via TransportFactory::toUnixPath() — for Unix endpoints they keep the historical file_exists() check; TCP endpoints can't be filesystem-probed, so presence is assumed (a missing daemon surfaces as a clear DaemonException on the first IPC call).

  • php bin/console opcua:session reflects the endpoint kind. The startup table shows "Endpoint" instead of "Socket", and the "Socket Mode" row is only printed for Unix-socket endpoints. The parent-directory mkdir is skipped for TCP endpoints.

Tests / CI

  • CI workflow aligned with opcua-client / opcua-session-manager: unit job cross-OS on ubuntu-latest / macos-latest / windows-latest × PHP 8.2–8.5 × Symfony 7.3 / 7.4 / 8.0 (with the existing exclusion matrix); integration job stays Ubuntu-only (Docker-hosted OPC UA servers) with needs: unit gating. [DOC] commits skip CI. codecov/codecov-action bumped from v5 to v6.
  • Unit tests (tests/Unit/) are fully cross-OS. Integration tests (tests/Integration/) remain Docker-dependent and run only in the integration job.
  • Full suite: 244 passing, 0 failing on Linux.

[4.1.0] - 2026-04-14

Added

  • Initial release of php-opcua/symfony-opcua. Symfony bundle equivalent of php-opcua/laravel-opcua, providing full OPC UA integration for Symfony 6.4+ and 7.x applications.

Bundle

  • PhpOpcuaSymfonyOpcuaBundle — modern AbstractBundle with semantic YAML configuration via TreeBuilder and service registration via loadExtension().
  • OpcuaManager — manages named connections, auto-detects session manager daemon, configures both direct (ClientBuilder) and managed (ManagedClient) modes. Autowirable as a service.
  • OpcUaClientInterface autowiring — factory-based service definition that returns the default connection, injectable anywhere via constructor injection.
  • opcua alias — convenience alias for OpcuaManager.
  • PSR-16 cache adapter — automatically wraps a Symfony PSR-6 cache pool (cache.app by default) into Psr16Cache for the OPC UA client.
  • PSR-3 logging — Monolog logger injected automatically. Configurable via log_channel to use a specific Monolog channel (monolog.logger.<channel>).
  • PSR-14 events — Symfony's EventDispatcherInterface injected automatically when available. All 47 OPC UA events dispatched through Symfony's event system.

Console Command

  • opcua:session — Symfony console command to start the session manager daemon. Supports --timeout, --cleanup-interval, --max-sessions, --socket-mode options.
  • Auto-publish support — when auto_publish is enabled, the daemon automatically calls publish() for sessions with active subscriptions and dispatches PSR-14 events.
  • Auto-connect support — connections with auto_connect: true are established on daemon startup with declarative subscription configuration.

Configuration

  • Full YAML-based semantic configuration with TreeBuilder validation:
    • default — default connection name
    • session_manager — daemon settings (enabled, socket_path, timeout, cleanup_interval, auth_token, max_sessions, socket_mode, allowed_cert_dirs, log_channel, cache_pool, auto_publish)
    • connections — named connections with endpoint, security (10 policies including ECC), authentication, timeouts, trust store, write auto-detection, metadata cache, auto-connect, and declarative subscriptions
  • Reference configuration file at config/opcua.yaml

Security

  • All 10 security policies supported: None, Basic128Rsa15, Basic256, Basic256Sha256, Aes128Sha256RsaOaep, Aes256Sha256RsaPss, ECC_nistP256, ECC_nistP384, ECC_brainpoolP256r1, ECC_brainpoolP384r1.
  • 3 security modes: None, Sign, SignAndEncrypt.
  • 3 authentication methods: anonymous, username/password, X.509 certificate.
  • Trust store with FileTrustStore, configurable TrustPolicy (fingerprint, fingerprint+expiry, full), auto-accept/TOFU mode.
  • Auto-generated client certificates when client_certificate/client_key are omitted.

Features (inherited from opcua-client v4.1.1)

  • All OPC UA operations — browse, read, write, call, subscriptions, events, history, path resolution, type discovery.
  • String NodeIds'i=2259', 'ns=2;s=MyNode' everywhere.
  • Fluent Builder APIreadMulti(), writeMulti(), createMonitoredItems(), translateBrowsePaths().
  • Write auto-detection — omit the type parameter on write().
  • Read metadata cache — cached node metadata with refresh parameter.
  • Type discoverydiscoverDataTypes() for server-defined structured types.
  • Subscription managementcreateMonitoredItems(), modifyMonitoredItems(), setTriggering(), transferSubscriptions(), republish().
  • Certificate trust managementtrustCertificate(), untrustCertificate().
  • Auto-batchingreadMulti/writeMulti transparently split when exceeding server limits.
  • Recursive browsebrowseAll(), browseRecursive() with depth control.
  • Path resolutionresolveNodeId('/Objects/Server/ServerStatus').
  • MockClient — test without a server.

Testing

  • 144 unit tests with Pest PHP and Mockery.
  • OpcuaManagerTest — 97 tests covering connection management, configuration, security resolution.
  • BundleTest — 12 tests covering TreeBuilder, service registration, alias, factory definitions.
  • ConfigurationTest — 10 tests covering defaults, custom values, subscriptions, validation.
  • SessionCommandTest — 25 tests covering config passthrough, CLI overrides, auto-publish, auto-connect, daemon config mapping.

Documentation

  • 10 documentation files (doc/01-introduction.md through doc/10-auto-publish.md) covering introduction, installation, usage, connections, session manager, logging & caching, security, testing, examples, and auto-publish.
  • Full README with feature table, code examples, ecosystem overview, and AI-Ready section.

Dependencies

  • php-opcua/opcua-client ^4.1.1
  • php-opcua/opcua-session-manager ^4.1
  • symfony/framework-bundle ^6.4|^7.0
  • symfony/console ^6.4|^7.0
  • symfony/dependency-injection ^6.4|^7.0
  • symfony/config ^6.4|^7.0
  • symfony/cache ^6.4|^7.0