sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

fix: bring back psr/log ^1

Open Zylius opened this issue 1 year ago • 4 comments

What was changed

Added support for psr/log ^1

Why?

It makes now sense to support ^2 |^3 but not support ^1, the changes are only in the way types are specified in interfaces. Symfony and projects like that all support ^1|^2|^3.

Zylius avatar Apr 30 '24 13:04 Zylius

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
php ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 1:07pm

vercel[bot] avatar Apr 30 '24 13:04 vercel[bot]

I can see that the "lowest-version" check will fail but I think this has negative impact on usability of this project. For example it cannot be used with symfony 5.3 and laminas-di 3.4

Zylius avatar Apr 30 '24 13:04 Zylius

I can see that the "lowest-version" check will fail

This happens because some dependency doesn't work with psr/log v1. You can check it using composer why-not psr/log 1.0.0

For example it cannot be used with symfony 5.3 and laminas-di 3.4

Hi 👋 Yes, we have upgraded the minimum Symfony version from 4.4 to 5.4.

https://github.com/temporalio/sdk-php/pull/378 The minimum version threshold for Symfony packages has been raised to 5.4. This is the lowest supported LTS version. The 4.4 version ceased to be supported in November 2023. image

roxblnfk avatar Apr 30 '24 20:04 roxblnfk

composer why-not psr/log 1.0.0

Yeah, The 5.4 or 5.3 isn't the issue, it doesn't matter, symfony supports psr/log ^3 from symfony 6 only.

As for the why-not, all the packages listed as why-not are spiral php packages which all have the "validate-prefer-lowest" for psr/log, which forces outside projects to update the psr/log. Which sometimes cannot be done due to other external packages.

So the public usability of the sdk decreases for no logical or practical reason.

Symfony 6/7 all support psr/log "^1|^2|^3"

I would encourage you guys to rethink the "validate-prefer-lowest" check, it's good for internal packages probably, but not so for public ones, in this specific case at least.

Zylius avatar May 01 '24 10:05 Zylius

I think we can close the PR, right?

roxblnfk avatar May 16 '24 07:05 roxblnfk

Yees, thank you

Zylius avatar May 17 '24 07:05 Zylius