[dev] horde/timezone unit tests: Pass on PHP 7.4, fail on PHP 8

Ralf Lang ralf.lang at ralf-lang.de
Mon Nov 7 10:07:00 UTC 2022


Am 06.11.2022 um 19:01 schrieb Michael J Rubinsky:
>
> Quoting Ralf Lang <ralf.lang at ralf-lang.de>:
>
>> See
>>
>> https://github.com/maintaina-com/Timezone/actions/runs/3399648494/jobs/5653535832 
>>
>>
>> The unit tests present diverging output in 4 cases on PHP 8 but are 
>> fine in PHP 7.4 - I am not very familiar with the package. It might 
>> be that the unit test fixtures are simply no longer in line with 
>> revised national laws.
>>
>> Any suggestions?
>
> IIRC, the way those tests work is to load a stanza of the Olson tz 
> database from the fixtures folder and compare it to the already 
> generated ics in the same fixtures folder. From the failure diff you 
> provided it looks like you are using different fixtures from what are 
> in upstream master?

As far as I recognize, no. Might be my fool's day...

a0cc71f64e9b:/srv/www # diff timezoneh5/test/Horde/Timezone/fixtures/ 
timezoneh6/test/fixtures/
a0cc71f64e9b:/srv/www # diff -r timezoneh5/test/Horde/Timezone/fixtures/ 
timezoneh6/test/fixtures/
a0cc71f64e9b:/srv/www # cp -ar timezoneh5/test/Horde/Timezone/fixtures/* 
timezoneh6/test/fixtures/
a0cc71f64e9b:/srv/www # cd timezoneh6/test/fixtures/

Running the test cases, no diff on PHP 7.4 but diffs appear on PHP 8.1, 8.2

I think somewhere in between some piece of code does not actually use 
the loaded timezone data but falls back to some builtin. I will try to 
find out.



More information about the dev mailing list