Skip to content

Conversation

@bahramsadin
Copy link
Contributor

No description provided.

@codemasher
Copy link
Member

Ha, I completely forgot about this despite the fact that was a PR of mine a couple years ago: php-fig/simple-cache#18. However, since the current version 5.x supports only PHP 8.1+, I'll update it with the according type hints. For v4.x I'll add the version switch as you suggested to allow upgrading.

@codemasher codemasher changed the title update composer.json update composer.json (psr/simple-cache v2 and v3) Feb 25, 2024
@codemasher codemasher merged commit 4054bff into chillerlan:main Feb 25, 2024
@codemasher
Copy link
Member

I'll cherry pick this to v4.x and add type hints for v5.x. Thank you for your contribution!

@bahramsadin bahramsadin deleted the update-composer branch February 25, 2024 14:08
@bahramsadin
Copy link
Contributor Author

bahramsadin commented Feb 25, 2024

@codemasher
Could you please release a new version incorporating these changes?
v4.2, v5.1

@codemasher
Copy link
Member

I just realized that this won't work for v4.x as the updated interfaces would break compatibility when installed under PHP 8+, so I'll leave this one untouched. I'm currently working on upgrading v5.x and will tag it as 5.1 as soon as I'm finished with it.

@codemasher
Copy link
Member

codemasher commented Feb 25, 2024

@bahramsadin I have tagged a new release 5.1.0. I had to adjust the requirement to "psr/simple-cache": "^2.0 || ^3.0" as v1.0 could break compatibility in certain cases (e.g. when a consumer library has 1.0 as the only requirement but would try to install 5.1.x).

As an implementer I cannot simply specify a version range (an exception in this case is psr/simple-cache v2 to v3 as the only changes between them are return types). On the other hand, a consumer library may specify any version that is able to satisfy the needs, to allow flexibility, e.g. to switch out a library - the specifics of the implementations are not necessarily relevant as long as the interface methods remain compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants