opcua-client-nodeset · v4.5.x · changelog

Changelog

[v4.5.0] - 2026-08-11

Changed

  • Bumped minimum php-opcua/opcua-client dependency from ^4.4.0 to ^4.5.0 and php-opcua/opcua-cli dev dependency from ^4.4.0 to ^4.5.0 to align with the lock-step release of the v4.5.0 ecosystem.
  • No regeneration required by the bump itself. The public API surface this package consumes (PhpOpcua\Client\Repository\ExtensionObjectRepository, PhpOpcua\Client\Repository\GeneratedTypeRegistrar, PhpOpcua\Client\Encoding\BinaryDecoder, PhpOpcua\Client\Encoding\BinaryEncoder, PhpOpcua\Client\Encoding\ExtensionObjectCodec) is unaffected by v4.5.0 — the security hardening, the typed PublishResult notifications and the final wire DTOs are all outside it. ExtensionObjectCodec::decode() only had its return PHPDoc narrowed from object|array to object|array<string, mixed>, which the generated codecs already satisfy.
  • Verified end-to-end against opcua-client v4.5.0: all 56 registrars load, all 193 codecs implement ExtensionObjectCodec, all 309 enum mappings resolve, all 67 dependency edges resolve, and 93 codecs decode through the v4.5.0 BinaryDecoder. composer format:check passes on all 807 generated files.

Fixed

Three defects in the generated code, all pre-existing and all specific to case-sensitive filesystems or to PHP's namespace resolution. They were found while verifying the v4.5.0 bump on Linux; a case-insensitive filesystem hid the first two.

  • Registrar dependency references did not resolve (32 references across 32 files). dependencyRegistrars() referenced PhpOpcua\Nodeset\DI\DIRegistrar (31 files) and PhpOpcua\Nodeset\GDS\GDSRegistrar (1 file), but the classes are named after the specification — DiRegistrar and GdsRegistrar. On Linux, calling dependencyRegistrars() on any of those 32 registrars raised Error: Class not found, breaking automatic dependency resolution for 32 of the 51 specifications.
  • AMLLibrariesRegistrar referenced a registrar that does not exist. The AML specification ships as two nodesets; AMLLibraries declares a RequiredModel of http://opcfoundation.org/UA/AML/, which is the model URI of AMLBaseTypes. The generator emitted new AMLRegistrar() from the model URI path segment instead of new AMLBaseTypesRegistrar().
  • Every DTO with an enum field was unconstructible, and its codec could not decode (25 DTOs, 53 fields, 25 codecs). Codecs live in PhpOpcua\Nodeset\<Spec>\Codecs and DTOs in PhpOpcua\Nodeset\<Spec>\Types; both address enums relatively as Enums\Foo, which PHP resolves against the current namespace — ...\Codecs\Enums and ...\Types\Enums, neither of which exists. In a codec that raised Error: Class not found on decode. In a DTO it was worse: the declared property type resolved to a class that does not exist, so no value could ever satisfy it and constructing the DTO always threw TypeError, whatever the caller passed. Both now import the specification's Enums namespace, so the existing references resolve without touching any declaration or method body. Affected specs: AutoID, BACnet, CAS, DI, ECM, FDI, FDT, I4AAS, MachineVision, PADIM, PROFINET, Safety, Scheduler, TMC.

Changed — generator

generate.php's dependency-validation pass previously only checked that the referenced specification directory existed, which is why all three defects above survived regeneration. It now:

  • resolves each reference against the registrar file that actually exists, repairing casing instead of only dropping references to specs that are not generated;
  • handles same-namespace (unqualified) references, which the old fully-qualified-only pattern never matched;
  • falls back, for a spec split across several nodesets, to the single registrar whose name extends the referenced one, excluding the referencing file itself;
  • imports the specification's Enums namespace into every codec and DTO that addresses enums relatively.

The pass is idempotent on a correct tree, and reproduces the corrected tree byte-for-byte from one with the three defects re-injected.

[v4.4.0] - 2026-05-28

Changed

  • Bumped minimum php-opcua/opcua-client dependency from ^4.3.0 to ^4.4.0 and php-opcua/opcua-cli dev dependency from ^4.3.0 to ^4.4.0 to align with the lock-step release of the v4.4.0 ecosystem.
  • No code changes or regeneration required — this package contains only pre-generated types, and the public API surface it consumes (PhpOpcua\Client\Repository\ExtensionObjectRepository, PhpOpcua\Client\Repository\GeneratedTypeRegistrar, PhpOpcua\Client\Encoding\BinaryDecoder, PhpOpcua\Client\Encoding\BinaryEncoder, PhpOpcua\Client\Encoding\ExtensionObjectCodec) is unaffected by the v4.4.0 additions (AggregateModule, HistoryUpdate methods, FileTransferModule, transport seam — see php-opcua/opcua-client v4.4.0 CHANGELOG for details).

[v4.3.0] - 2026-04-24

Changed

  • Bumped php-opcua/opcua-client from ^4.2.0 to ^4.3.0 and php-opcua/opcua-cli (dev) to ^4.3.0.
  • Regenerated all 807 files with opcua-cli v4.3.0 — output unchanged.

[v4.2.0] - 2026-04-17

Changed

  • Bumped minimum php-opcua/opcua-client dependency from ^4.1 to ^4.2.0 and php-opcua/opcua-cli dev dependency from ^4.1 to ^4.2.0 to align with the Kernel + ServiceModule architecture introduced in opcua-client v4.2.0. No code changes or regeneration required — this package contains only pre-generated types, and the public API surface it consumes (PhpOpcua\Client\Repository\ExtensionObjectRepository, PhpOpcua\Client\Repository\GeneratedTypeRegistrar, PhpOpcua\Client\Encoding\BinaryDecoder, PhpOpcua\Client\Encoding\BinaryEncoder, PhpOpcua\Client\Encoding\ExtensionObjectCodec) is unchanged by the v4.2.0 refactor.
  • Verified end-to-end compatibility against v4.2.0: composer format:check passes on all 807 generated files, and a smoke load of the Robotics registrar (registerCodecs() + getEnumMappings()) returns the expected 4 enum mappings.

[v4.1.0] - 2026-04-13

Changed

  • Bumped minimum php-opcua/opcua-client dependency from ^4.0 to ^4.1 and php-opcua/opcua-cli dev dependency from ^4.0 to ^4.1 to align with the ECC security policies (ECC_nistP256, ECC_nistP384, ECC_brainpoolP256r1, ECC_brainpoolP384r1) introduced in opcua-client v4.1.0. No code changes or regeneration required — this package contains only pre-generated types that are unaffected by security layer changes.
  • Updated ecosystem table in README to reference uanetstandard-test-suite instead of opcua-test-suite.

v4.0.0 - 2026-03-29

Added

  • Pre-generated PHP types for 51 OPC UA companion specifications. 807 PHP files generated from the OPC Foundation UA-Nodeset repository, covering industrial protocols from Robotics to BACnet. Zero configuration — just composer require and use.
  • NodeId constants. One class per specification with all node IDs as string constants, usable directly with read(), write(), browse() on the OPC UA client. Example: RoboticsNodeIds::OperationalMode.
  • PHP BackedEnum generation. 309 enum classes across all specifications. When loaded via the registrar, read() returns typed enum instances instead of raw integers. Example: OperationalModeEnumeration::MANUAL_REDUCED_SPEED.
  • Readonly DTOs. 193 strictly typed readonly classes for structured OPC UA data types. Enum fields are typed with the corresponding generated enum class. Array fields and optional (nullable) fields are fully supported.
  • Binary codecs. 193 ExtensionObjectCodec implementations for binary encode/decode of structured data types. Automatically registered via the registrar system.
  • Registrar system with automatic dependency resolution. Each specification provides a GeneratedTypeRegistrar with registerCodecs(), getEnumMappings(), and dependencyRegistrars(). Loading one specification automatically loads its dependencies recursively — e.g. loading MachineToolRegistrar automatically loads Machinery, DI, and IA. Use new MachineToolRegistrar(only: true) to skip dependency loading.
  • PHP generation script. generate.php handles the full pipeline: clones UA-Nodeset if not present, iterates all specifications, calls opcua-cli generate:nodeset for each XML, and runs integrated dependency cleanup to remove references to non-generated registrars.

Specifications included

AMB, ADI, AML, AutoID, BACnet, CAS, CNC, CommercialKitchenEquipment, CranesHoists, CSPPlusForMachine, CuttingTool, DEXPI, DI, ECM, FDI, FDT, GDS, GPOS, I4AAS, IA, IOLink, IREDES, ISA95, LADS, LaserSystems, Machinery, MachineTool, MachineVision, MDIS, MetalForming, MTConnect, Onboarding, PackML, PADIM, PAEFS, PNEM, POWERLINK, PROFINET, Pumps, Robotics, RSL, Safety, Scales, Scheduler, Sercos, Shotblasting, TMC, Weihenstephan, Woodworking, WoT.