[dev] Kolab_Format on php 8
Ralf Lang
ralf.lang at ralf-lang.de
Tue Aug 16 21:22:12 UTC 2022
Am 16.08.22 um 08:25 schrieb Ralf Lang:
> 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.
Yes, I finished kolab_storage tonight. It passes the test suite in PHP
8.1 without spamming notices - provided all dependencies are up to date.
Some patches against the actual library code were separated out and are
available as a PR for horde upstream.
I had to abandon the Story tests though - they are based on a deprecated
PHPUnit extension and would require to be rewritten in behat or the
likes. I won't do that for the Kolab support libraries.
More information about the dev
mailing list