DKE-Data / agrirouter-sdk-php

This project contains the SDK for the communication with the agrirouter. Everything you need for the onboarding process, secure communication and much more.
Apache License 2.0
2 stars 3 forks source link

Invalid call to `DateTime` constructor #49

Open oliverrahner opened 6 months ago

oliverrahner commented 6 months ago

DateTime constructor must not be called with null for the $datetime parameter: https://www.php.net/manual/en/datetime.construct.php

https://github.com/DKE-Data/agrirouter-sdk-php/blob/44daf1ba1916140b2d8be66dad294341a831c0a5/src/Service/Common/UtcDataService.php#L25

Replacing null with "now" should do the trick.

oliverrahner commented 6 months ago

The test case currently fails for this.