Changelog
[4.3.1] - 2026-05-12
Added
- Per-connection
log_channelconfig key — Laravel channel name resolved lazily, no Facade 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')— SymfonyConsoleLoggerwrapped with millisecond timestamp by default; passdateFormat: nullto disable.OpcuaManager::getLogger().Logging\TimestampedLogger— generic PSR-3 decorator that prepends a formatted timestamp.OpcuaServiceProviderwires alog-manager → channel resolver into the manager.
Changed
OpcuaManager::__constructgained an optional?\Closure $loggerResolverparameter (5th, defaultnull, BC-safe).- Logger resolution priority: runtime override → config
'logger'→ config'log_channel'→ default logger. - Bumped
php-opcua/opcua-client^4.2.0→^4.3.0andphp-opcua/opcua-session-manager^4.2.0→^4.3.1. Notable downstream impact:NodeManagementModuleis back in the default module list —addNodes()/deleteNodes()/addReferences()/deleteReferences()reachable throughOpcua::*. Servers without the service set raiseServiceUnsupportedExceptionon first call (still a subclass ofServiceException, existing handlers keep matching).- Top-level
ServiceFaultnow decodes toServiceExceptioninstead of the misleadingEncodingException: Buffer underflow. - Wire-format compliance fixes:
RequestHeader.timestampis a validUtcTime, anonymouspolicyIddiscovered 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. NewClientBuilder::setCacheCodec()is available if you need to override. - Daemon:
--versionflag,umask(0077)around bind closes the socket-permission race, NDJSON 64 KiB per-frame cap, IPv4-mapped IPv6 loopback handled,usernameno longer leaked vialist, 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
DaemonExceptioninstead of a confusingchmod(): No such file or directoryafter silent kernel truncation.
Tests
- +12 unit tests.
[4.2.0] - 2026-04-17
Changed
- Bumped
php-opcua/opcua-clientfrom^4.1.1to^4.2.0andphp-opcua/opcua-session-managerfrom^4.1to^4.2.0. Picks up the Kernel + ServiceModule architecture, the Wire-serialization pipeline, the describe/invoke IPC commands that make third-party modules reachable throughManagedClient::__call(), and the cross-platform IPC transport (Unix socket on Linux/macOS, TCP loopback on Windows). - Relocated DTO imports in
src/Facades/Opcua.php:BrowsePathResult,BrowseResultSet,CallResult,MonitoredItemModifyResult,MonitoredItemResult,PublishResult,SetTriggeringResult,SubscriptionResult,TransferResultnow live in their module namespaces (PhpOpcua\Client\Module\*) rather thanPhpOpcua\Client\Types\*. No behaviour change — only the fully-qualified class names moved.
Added
-
Cross-platform session manager out of the box.
config/opcua.php → session_manager.socket_pathnow accepts:unix://<path>(explicit Unix-domain socket)tcp://127.0.0.1:<port>(loopback-only — non-loopback hosts are refused byTcpLoopbackTransporton the client and bySessionManagerDaemonon the daemon)- scheme-less path (interpreted as
unix://<path>, backwards-compatible with pre-v4.2.0 configs)
Default value is platform-aware:
storage_path('app/opcua-session-manager.sock')on Linux/macOS,tcp://127.0.0.1:9990on Windows.OpcuaManager::isSessionManagerRunning()andOpcuaManager::shouldUseSessionManager()now inspect the endpoint URI viaTransportFactory::toUnixPath()— for Unix endpoints they keep the historicalfile_exists($socketPath)check; TCP endpoints can't be filesystem-probed, so presence is assumed (a missing daemon surfaces as a clearDaemonExceptionon the first IPC call). -
php artisan opcua:session-managerreflects the endpoint kind. The startup table shows "Endpoint" instead of "Socket", and the "Socket Mode" row is only printed for Unix-socket endpoints.mkdir -pfor the parent directory is skipped for TCP endpoints.
Tests / CI
- CI workflow aligned with
opcua-client/opcua-session-manager:unitjob cross-OS onubuntu-latest/macos-latest/windows-latest× PHP 8.2–8.5 × Laravel 11/12/13 (with the existing exclusion matrix);integrationjob stays Ubuntu-only (Docker-hosted OPC UA servers) withneeds: unitgating.[DOC]commits skip CI.codecov/codecov-actionbumped fromv5tov6. - Unit tests (
tests/Unit/) are fully cross-OS. Integration tests (tests/Integration/) remain Docker-dependent and run only in the integration job. - Full suite: 359 passing, 1 skipped, 0 failing on Linux.
[4.1.1] - 2026-04-13
Fixed
- Cache serialization compatibility with Laravel 13. Bumped
php-opcua/opcua-clientto^4.1.1which fixescachedFetch()storing raw PHP objects in the PSR-16 cache. Laravel 13 defaults toserializable_classes => falseinconfig/cache.php, causing all cached OPC UA types (ReferenceDescription,NodeId,DataValue, etc.) to be restored as__PHP_Incomplete_Classon cache hit. The fix wraps cached values as safe strings so the cache backend is immune toallowed_classesrestrictions. (#1, php-opcua/opcua-client#1)
Added
- Integration test
CacheSerializationTestverifying browse results survive a file cache roundtrip across connections and that cached values are plain strings immune toallowed_classesrestrictions.
[4.1.0] - 2026-04-13
Added
- ECC security policy support.
security_policyconfig key now acceptsECC_nistP256,ECC_nistP384,ECC_brainpoolP256r1, andECC_brainpoolP384r1in addition to the existing 6 RSA policies. Added toresolveSecurityPolicyUri()in bothOpcuaManagerandSessionCommand. Noclient_certificate/client_keyneeded — ECC certificates are auto-generated when omitted. Username/password authentication uses theEccEncryptedSecretprotocol automatically.- ECC disclaimer: No commercial OPC UA vendor supports ECC endpoints yet. This implementation is tested exclusively against the OPC Foundation's UA-.NETStandard reference stack.
Changed
- Bumped minimum
php-opcua/opcua-clientdependency from^4.0.0to^4.1andphp-opcua/opcua-session-managerfrom^4.0.3to^4.1. - Security support expanded from 6 to 10 policies (6 RSA + 4 ECC).
- Updated CI test server suite from
php-opcua/[email protected]to@v1.1.0. - Updated
config/opcua.phpsecurity policy comment to list all 10 available policies including ECC. - Updated documentation (README, doc/07-security.md, doc/09-examples.md, llms.txt, llms-full.txt, llms-skills.md) to reflect ECC support, add ECC
.envexamples, and include the ECC disclaimer.
[4.0.1] - 2026-04-09
Added
- Auto-publish. New
auto_publishconfig key insession_managersection. When enabled, the daemon automatically callspublish()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 yourEventServiceProviderto handle notifications. - Per-connection auto-connect. New
auto_connectconfig key per connection. Whentrue(andauto_publishis enabled), the daemon auto-connects to the endpoint on startup and registers the subscriptions defined in the newsubscriptionsconfig key. Connections withoutauto_connectare managed imperatively as before. - Declarative subscription config. New
subscriptionsconfig key per connection. Definemonitored_itemsandevent_monitored_itemsdirectly inconfig/opcua.php— the daemon creates them automatically on startup. Each subscription supportspublishing_interval,max_keep_alive_count,lifetime_count,priority, and per-itemsampling_interval,queue_size,client_handle,select_fields. - Event dispatcher injection into daemon.
SessionCommandresolvesEventDispatcherInterfacefrom 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. SessionCommand::buildAutoConnectConfig()— reads connections withauto_connect: trueand builds the daemon's auto-connect configuration.SessionCommand::mapToDaemonConfig()— maps Laravel connection config keys (security_policy,timeout,client_certificate, etc.) to the daemon's internal format (securityPolicy,opcuaTimeout,clientCertPath, etc.).SessionCommand::resolveEventDispatcher()— resolvesEventDispatcherInterfacefrom the Laravel container.SessionCommand::resolveSecurityPolicyUri()andresolveSecurityModeValue()— helper methods for security config mapping.- New
.envvariable:OPCUA_AUTO_PUBLISH. - Auto-publish status displayed in the
opcua:sessionstartup table. - Auto-connect summary displayed before daemon startup when connections are configured.
- Unit tests for
buildAutoConnectConfig,mapToDaemonConfig, auto-publish flag passing, event dispatcher resolution, auto-connect filtering. - New documentation: Auto-Publish & Monitoring with real-world industrial use case.
Changed
- Updated dependency
php-opcua/opcua-session-managerfrom^4.0.0to^4.0.3(required for auto-publish and auto-connect support). SessionCommand::createDaemon()now accepts?EventDispatcherInterface $clientEventDispatcherandbool $autoPublishparameters.
[4.0.0] - 2026-04-7
Changed
- BREAKING: Package rebranded from
gianfriaur/opcua-laravel-clienttophp-opcua/laravel-opcua. - BREAKING: Namespace changed from
Gianfriaur\OpcuaLaraveltoPhpOpcua\LaravelOpcua. - BREAKING: Updated dependency
php-opcua/opcua-clientfrom^3.0.0to^4.0.0(wasgianfriaur/opcua-php-client). - BREAKING: Updated dependency
php-opcua/opcua-session-managerfrom^3.0.0to^4.0.0(wasgianfriaur/opcua-php-client-session-manager). - BREAKING: Direct mode now uses
ClientBuilder→Clientpattern. Configuration methods (setSecurityPolicy,setTimeout,setAutoRetry,setBatchSize,setDefaultBrowseMaxDepth,setLogger,setCache) moved fromClienttoClientBuilder. All configuration is applied fromconfig/opcua.phpbefore connection. Theconnection()method for direct mode now returns a connectedClient(auto-connects to the configured endpoint). The pattern of callingconnection()then manually configuring and connecting is no longer supported for direct mode. Managed mode (via session manager daemon) is unchanged. - BREAKING:
write()type parameter is now nullable:write(NodeId|string $nodeId, mixed $value, ?BuiltinType $type = null). Passnull(or omit) for automatic type detection. - BREAKING:
read()has a newbool $refresh = falseparameter for bypassing the read metadata cache. - BREAKING:
OpcUaClientInterfaceno longer has setter methods (setLogger,setCache,setTimeout, etc.). These are now onClientBuilderInterfacefor direct mode and remain onManagedClientfor managed mode. - BREAKING:
ExtensionObjectvalues are now returned asExtensionObjectreadonly DTOs instead ofarray|object. OpcuaManagerinternally split intoconfigureBuilder()(for direct mode viaClientBuilderInterface) andconfigureManagedClient()(for managed mode viaManagedClient). The oldconfigureClient()method has been removed.- Removed setter
@methodannotations from Facade (setLogger,setCache,setTimeout,setAutoRetry,setBatchSize,setDefaultBrowseMaxDepth) since they are no longer onOpcUaClientInterface. - Updated CI test server suite from
php-opcua/[email protected]tophp-opcua/[email protected]. - Updated all documentation references:
opcua-php-clienttoopcua-client,opcua-php-client-session-managertoopcua-session-manager,opcua-test-server-suitetouanetstandard-test-suite,opcua-laravel-clienttolaravel-opcua. - Added "Tested against the OPC UA reference implementation" disclaimer to README.
- Added "Versioning" section to README.
- Aligned Ecosystem table with
opcua-client(addedopcua-cli,opcua-client-nodeset).
Added
- PSR-14 Event System. 47 granular events for connections, sessions, reads, writes, browses, subscriptions, alarms, retries, cache, and certificates. Configure via
event_dispatcherin connection config or bindEventDispatcherInterfacein the Laravel container. - Server Trust Store. New config keys
trust_store_path,trust_policy(fingerprint,fingerprint+expiry,full),auto_accept,auto_accept_forceper connection. For direct mode, creates aFileTrustStore. For managed mode, forwards viaManagedClient::setTrustStorePath(). - Write type auto-detection. New
auto_detect_write_typeconfig key (default:true). When enabled, thewrite()method auto-detects the OPC UA type by reading node metadata, then caches the result. - Read metadata cache. New
read_metadata_cacheconfig key (default:false). Caches non-Value attribute reads (DisplayName, BrowseName, DataType, etc.) via PSR-16. Theread($nodeId, refresh: true)parameter bypasses the cache. modifyMonitoredItems(). Change sampling interval, queue size, or client handle on existing monitored items without recreation. ReturnsMonitoredItemModifyResult[].setTriggering(). Configure triggering links between monitored items. ReturnsSetTriggeringResultwith per-link status codes.- Certificate trust management via Facade.
trustCertificate(string $certDer)anduntrustCertificate(string $fingerprint)for programmatic trust store management. - Event dispatcher injection.
OpcuaServiceProviderresolvesEventDispatcherInterfacefrom the Laravel container (if bound) and injects it intoOpcuaManager. - New config keys per connection:
trust_store_path,trust_policy,auto_accept,auto_accept_force,auto_detect_write_type,read_metadata_cache. - New
.envvariables:OPCUA_TRUST_STORE_PATH,OPCUA_TRUST_POLICY,OPCUA_AUTO_ACCEPT,OPCUA_AUTO_ACCEPT_FORCE,OPCUA_AUTO_DETECT_WRITE_TYPE,OPCUA_READ_METADATA_CACHE. - New Facade
@methodannotations:getEventDispatcher(),getTrustStore(),getTrustPolicy(),trustCertificate(),untrustCertificate(),modifyMonitoredItems(),setTriggering(). - New exception types from dependencies:
UntrustedCertificateException,WriteTypeDetectionException,WriteTypeMismatchException. - Added
psr/event-dispatcher^1.0 to dependencies. - Unit tests for
configureBuilder(direct mode) andconfigureManagedClient(managed mode) covering all v4.0 config options: trust store, trust policy, auto-accept, auto-detect write type, read metadata cache, event dispatcher. - Unit tests for
resolveTrustPolicy()helper. - Unit test for event dispatcher injection in
OpcuaServiceProvider. - Config test for new v4.0 config keys.
- AI-Ready documentation. Added
llms-skills.mdwith 13 task-oriented recipes for AI coding assistants (install, read, write, browse, named connections, session manager, methods, subscriptions, history, security, testing, dependency injection, events). Designed to be fed to Claude, Cursor, Copilot, ChatGPT, and other AI tools so they can generate correct code for Laravel OPC UA integration. - Added AI-Ready section to README with instructions for integrating with Claude Code, Cursor, GitHub Copilot, and other AI tools.
[3.0.0] - 2026-03-23
Changed
- BREAKING: Updated dependency
php-opcua/opcua-clientfrom^2.0.0to^3.0.0. - BREAKING: Updated dependency
php-opcua/opcua-session-managerfrom^2.0.0to^3.0.0. - BREAKING: Service response methods now return typed DTOs instead of arrays:
createSubscription()→SubscriptionResult(access via->subscriptionId,->revisedPublishingInterval, etc.)createMonitoredItems()→MonitoredItemResult[](access via->statusCode,->monitoredItemId, etc.)createEventMonitoredItem()→MonitoredItemResultcall()→CallResult(access via->statusCode,->outputArguments, etc.)browseWithContinuation()/browseNext()→BrowseResultSet(access via->references,->continuationPoint)publish()→PublishResult(access via->subscriptionId,->notifications, etc.)translateBrowsePaths()→BrowsePathResult[](access via->statusCode,->targets)
- BREAKING: Browse methods
nodeClassMask: intparameter changed tonodeClasses: NodeClass[]. Use[NodeClass::Object, NodeClass::Variable]instead of bitmask integers. - BREAKING: Named parameters renamed:
readMulti($items)→readMulti($readItems),writeMulti($items)→writeMulti($writeItems),createMonitoredItems(..., $items)→createMonitoredItems(..., $monitoredItems). - BREAKING: Type classes now expose
public readonlyproperties. Getter methods are deprecated:$ref->getNodeId()→$ref->nodeId,$dv->getStatusCode()→$dv->statusCode,$dv->getValue()(convenience method, unchanged), etc. - Session manager daemon now uses Laravel log channels and cache stores instead of custom
log_file/cache_driverconfig keys. OpcuaServiceProvidernow injects Laravel's default PSR-3 logger and PSR-16 cache intoOpcuaManagerfor automatic client configuration.
Added
- String NodeId parameters everywhere. All methods accepting
NodeIdnow also accept OPC UA string format:'i=2259','ns=2;s=MyNode','ns=2;i=1001'. - Fluent Builder API.
readMulti(),writeMulti(),createMonitoredItems(),translateBrowsePaths()return a fluent builder when called without arguments. - PSR-3 Logging.
setLogger()andgetLogger()exposed on client instances and via facade. Laravel's logger is injected by default. - PSR-16 Cache.
setCache(),getCache(),invalidateCache(),flushCache()for browse result caching. Laravel's cache is injected by default. - Per-call cache control.
useCacheparameter onbrowse(),browseAll(),getEndpoints(),resolveNodeId(). - Automatic DataType discovery.
discoverDataTypes()discovers server-defined structured types and registers dynamic codecs. - Extension object repository.
getExtensionObjectRepository()for custom structured type handling. - Subscription transfer.
transferSubscriptions()andrepublish()for session recovery. - DataValue factory methods.
DataValue::ofInt32(),DataValue::ofString(), etc. for convenient value creation. - MockClient for testing. Drop-in test double via
MockClient::create()with call recording and handler registration. - Config keys
log_channelandcache_storeinsession_managersection for daemon logging/caching via Laravel channels/stores. - Artisan command options
--log-channeland--cache-storeforphp artisan opcua:session. - Updated
Opcuafacade PHPDoc with all new v3.0 method signatures includingNodeClass[],BrowseResultSet,SubscriptionResult,CallResult,PublishResult, builder return types, and cache/logger methods. - Integration tests for string NodeId, builder API, cache operations, logger, and type discovery.
Removed
buildDaemonCache()andbuildDaemonLogger()fromOpcuaManager(daemon now uses Laravel's log channels and cache stores directly).- Config keys
log_file,log_level,cache_driver,cache_path,cache_ttl(replaced bylog_channelandcache_store).
[2.0.0] - 2026-03-20
Changed
- BREAKING: Updated dependency
php-opcua/opcua-clientfrom^1.1.0to^2.0.0. - BREAKING: Updated dependency
php-opcua/opcua-session-managerfrom^1.1.0to^2.0.0. - BREAKING:
browse()andbrowseWithContinuation()$directionparameter changed frominttoBrowseDirectionenum. Calls usingdirection: 0ordirection: 1must be updated toBrowseDirection::Forward/BrowseDirection::Inverse. - Updated CI test server suite from
php-opcua/[email protected]tophp-opcua/[email protected].
Added
- Timeout configuration. New
timeoutkey in connection config (seconds). Also available viaOpcua::setTimeout()fluent API. Default:5.0. - Auto-retry configuration. New
auto_retrykey in connection config. Automatically reconnects and retries onConnectionException. Also available viaOpcua::setAutoRetry(). Default:0before connect,1after connect. - Automatic batching configuration. New
batch_sizekey in connection config. When enabled,readMulti/writeMulticalls are transparently split into batches when exceeding server limits. Set to0to disable. Also available viaOpcua::setBatchSize(). - Browse max depth configuration. New
browse_max_depthkey in connection config. Controls default depth forbrowseRecursive(). Also available viaOpcua::setDefaultBrowseMaxDepth(). Default:10. - Connection state management. New methods exposed via facade:
reconnect(),isConnected(),getConnectionState(). - browseAll(). Browse with automatic continuation point handling — returns all references in one call.
- browseRecursive(). Recursive tree traversal returning
BrowseNode[]with configurable depth and cycle detection. - translateBrowsePaths(). OPC UA TranslateBrowsePathsToNodeIds service for batch path resolution.
- resolveNodeId(). Human-readable path resolution (e.g.
/Objects/Server/ServerStatus). - Server operation limits discovery.
getServerMaxNodesPerRead()andgetServerMaxNodesPerWrite()expose discovered limits. - historyReadProcessed() and historyReadAtTime() methods exposed via facade.
- Updated
Opcuafacade PHPDoc with all new v2.0 method signatures for IDE autocompletion. - New
config/opcua.phpkeys:timeout,auto_retry,batch_size,browse_max_depthper connection. OpcuaManager::configureClient()applies new v2.0 settings (timeout, auto-retry, batching, browse depth) to client instances.- Unit tests for
configureClientv2.0 options (timeout, auto_retry, batch_size, browse_max_depth) — all null/non-null paths. - Integration tests:
ConnectionStateTest,TimeoutTest,AutoRetryTest,BatchingTest,BrowseRecursiveTest,TranslateBrowsePathTest,HistoryReadAdvancedTest.
[1.1.0] - 2026-03-18
Changed
- Updated dependencies
php-opcua/opcua-clientandphp-opcua/opcua-session-managerfrom^1.0.1to^1.1.0.
Added
- Auto-generated client certificate support. When a connection is configured with a
security_policyandsecurity_modebut withoutclient_certificate/client_key, the underlying client automatically generates an in-memory self-signed certificate. The behaviour is fully transparent — no changes to the config file or application code are required. - Config comment on
client_certificate/client_keykeys documenting the auto-generation fallback. - Unit tests (
configureClient certificate behavior) covering: no call tosetClientCertificatewhen cert is absent, no call when only one of cert/key is provided, correct call when both are present, and correct forwarding of the optionalca_certificate. - Integration tests for connecting with
Basic256Sha256/SignAndEncryptand no explicit client certificate, in both direct mode and managed (session manager daemon) mode.
[1.0.1] - 2026-03-16
Added
- Initial release. Laravel service provider, facade,
OpcuaManager(multi-connection, session-manager auto-detection), andopcua:sessionArtisan command.