Bug fixes release
Fixed
- TypeError when parsing nested objects from charger responses —
json_decodeproduces arrays, butCallResult/Callproperties typed?objectrejected them on PHP 8.2+. Properties are now auto-coerced via reflection. PropertyConstraintViolationErrorhad wrong class name — was declaringNotImplementedError(copy-paste bug). Now correctly declaresPropertyConstraintViolationError.
Added
CallError::fromArray()— parse incoming[4, uniqueId, errorCode, ...]messages into the correctCallErrorsubclass. Maps all 12 OCPP error codes.JsonSchemaValidatornow handlesCallError— validates structural integrity (errorCode, errorDescription, errorDetails) instead of skipping silently.JsonSchemaRegistry::createFromArray()now supports message type 4 (CallError).
Full Changelog: 0.1.2...0.1.3