Solution that works for both PHP 7 and PHP 8 would be to change line 26 in \Prooph\EventStore\Internal\DateTimeStringBugWorkaround::fixDateTimeString to
if (false === $micros || '' === $micros) {
A failing date would be 2020-12-14T12:55:57Z, which will be converted to 2020-12-14T12:55:57Z000000Z
PHP 8 is not yet supported (as specified in composer.json). There will most likely be more issues than just this one. Feel free to open a PR, adding PHP 8 to composer.json and travis + fixing this problem.
Since PHP 8,
substr()
returns an empty string where it previously returned false (see https://www.php.net/manual/en/function.substr.php)Solution that works for both PHP 7 and PHP 8 would be to change line 26 in
\Prooph\EventStore\Internal\DateTimeStringBugWorkaround::fixDateTimeString
toif (false === $micros || '' === $micros) {
A failing date would be
2020-12-14T12:55:57Z
, which will be converted to2020-12-14T12:55:57Z000000Z