[dev] Kolab_Format on php 8

Ralf Lang ralf.lang at ralf-lang.de
Tue Aug 16 06:25:23 UTC 2022


Hi,

while updating horde/kolab_format for PHPUnit 9.5 under PHP 8 I 
discovered that some date related tests did no longer behave as expected 
under PHP 8.1

This required two minor changes to the actual library code:

- 
https://github.com/maintaina-com/Kolab_Format/commit/c62a480d52e143bb750d8e0d3dc3cc87386a7cdc#diff-cc459e33704cf306b3a04080b7f32e21fae20c1554db1c4e9a76b3ca18509cacR82

A checking regex now filters for ISO 8601:2004 date string. While the 
Kolab Format 2.0 spec only mentions full second iso dates I also allowed 
optional fractional parts - both the supposedly valid and invalid test 
data included these.

https://github.com/maintaina-com/Kolab_Format/commit/c62a480d52e143bb750d8e0d3dc3cc87386a7cdc#diff-98ee07c334b35e413e38d3795df42a7ed6c5c28002102732b87d8cfe3df8cc8fR112

In _parsexml() I catch empty input strings to DOMDocument as they are 
not allowed anymore and would raise an exception.

I will not create a Pull Request unless you want one - my larger goal is 
to get the complete set into horde's upstream repo.

Next will probably be kolab_storage tonight.




More information about the dev mailing list