Changelog
[v4.5.0] - 2026-08-11
Changed
- Bumped minimum
php-opcua/opcua-clientdependency from^4.4.0to^4.5.0andphp-opcua/opcua-clidev dependency from^4.4.0to^4.5.0to 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 typedPublishResultnotifications and thefinalwire DTOs are all outside it.ExtensionObjectCodec::decode()only had its return PHPDoc narrowed fromobject|arraytoobject|array<string, mixed>, which the generated codecs already satisfy. - Verified end-to-end against
opcua-clientv4.5.0: all 56 registrars load, all 193 codecs implementExtensionObjectCodec, all 309 enum mappings resolve, all 67 dependency edges resolve, and 93 codecs decode through the v4.5.0BinaryDecoder.composer format:checkpasses 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()referencedPhpOpcua\Nodeset\DI\DIRegistrar(31 files) andPhpOpcua\Nodeset\GDS\GDSRegistrar(1 file), but the classes are named after the specification —DiRegistrarandGdsRegistrar. On Linux, callingdependencyRegistrars()on any of those 32 registrars raisedError: Class not found, breaking automatic dependency resolution for 32 of the 51 specifications. AMLLibrariesRegistrarreferenced a registrar that does not exist. The AML specification ships as two nodesets;AMLLibrariesdeclares aRequiredModelofhttp://opcfoundation.org/UA/AML/, which is the model URI ofAMLBaseTypes. The generator emittednew AMLRegistrar()from the model URI path segment instead ofnew 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>\Codecsand DTOs inPhpOpcua\Nodeset\<Spec>\Types; both address enums relatively asEnums\Foo, which PHP resolves against the current namespace —...\Codecs\Enumsand...\Types\Enums, neither of which exists. In a codec that raisedError: Class not foundon 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 threwTypeError, whatever the caller passed. Both now import the specification'sEnumsnamespace, 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
Enumsnamespace 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-clientdependency from^4.3.0to^4.4.0andphp-opcua/opcua-clidev dependency from^4.3.0to^4.4.0to 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,HistoryUpdatemethods,FileTransferModule, transport seam — seephp-opcua/opcua-clientv4.4.0 CHANGELOG for details).
[v4.3.0] - 2026-04-24
Changed
- Bumped
php-opcua/opcua-clientfrom^4.2.0to^4.3.0andphp-opcua/opcua-cli(dev) to^4.3.0. - Regenerated all 807 files with
opcua-cliv4.3.0 — output unchanged.
[v4.2.0] - 2026-04-17
Changed
- Bumped minimum
php-opcua/opcua-clientdependency from^4.1to^4.2.0andphp-opcua/opcua-clidev dependency from^4.1to^4.2.0to align with the Kernel + ServiceModule architecture introduced inopcua-clientv4.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:checkpasses 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-clientdependency from^4.0to^4.1andphp-opcua/opcua-clidev dependency from^4.0to^4.1to align with the ECC security policies (ECC_nistP256,ECC_nistP384,ECC_brainpoolP256r1,ECC_brainpoolP384r1) introduced inopcua-clientv4.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-suiteinstead ofopcua-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 requireand 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
readonlyclasses 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
ExtensionObjectCodecimplementations for binary encode/decode of structured data types. Automatically registered via the registrar system. - Registrar system with automatic dependency resolution. Each specification provides a
GeneratedTypeRegistrarwithregisterCodecs(),getEnumMappings(), anddependencyRegistrars(). Loading one specification automatically loads its dependencies recursively — e.g. loadingMachineToolRegistrarautomatically loads Machinery, DI, and IA. Usenew MachineToolRegistrar(only: true)to skip dependency loading. - PHP generation script.
generate.phphandles the full pipeline: clones UA-Nodeset if not present, iterates all specifications, callsopcua-cli generate:nodesetfor 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.