device-detector icon indicating copy to clipboard operation
device-detector copied to clipboard

allow later Symfony versions

Open tacman opened this issue 1 year ago • 6 comments

Description:

Please include a description of this change and which issue it fixes. If no issue exists yet please include context and what problem it solves.

Review

tacman avatar Jan 30 '24 18:01 tacman

Some tests seem to be failing. Maybe newer version aren't compatible with our code 🤔

sgiehl avatar Feb 06 '24 13:02 sgiehl

Yes, it appears to fail in PHP 7.2, which is so old it doesn't even show up on https://www.php.net/supported-versions.php

How about releasing a version 7 of this library that drops support for anything EOL? A bonus is that then the code could up updated to use some of the goodness that comes with PHP 8.1+, like typehints and property promotion. Anyone still using PHP 7.2 could continue to use version 6.

tacman avatar Feb 06 '24 14:02 tacman

I guess that would be another reason for new major version added to the list in #7544

Simbiat avatar Feb 06 '24 14:02 Simbiat

As this library is a mandatory part of Matomo, we currently need to support the same PHP versions. Matomo is still compatible with 7.2, so for now we can't change that easily without additional effort.

Anyway, I guess the problem is located in our test action. It currently installs composer dependencies without respecting the platform requirements. Maybe removing this might solve it, as it should then only install a symfony version that is compatible with the used PHP version. See https://github.com/matomo-org/device-detector/blob/master/.github/workflows/phpunit.yml#L49

sgiehl avatar Feb 06 '24 14:02 sgiehl

Yes, I believe that would work, though I'm still learning how to properly set up the matrix for github actions.

tacman avatar Feb 06 '24 14:02 tacman

you can try changing the composer installs in the linked file above and remove the --ignore-platform-reqs

sgiehl avatar Feb 06 '24 15:02 sgiehl