Closed SpartakusMd closed 1 year ago
A suggestion I would make is to replace the comments in NullAdapter and NullCacheItem with @inheritDoc
in order to use the phpdocs from the interface itself. WDYT?
Hi @georged, in that case, the PR #82 needs to be reverted as the src/Cache/NullAdapter.php
and src/Cache/NullCacheItem.php
are not compatible with psr/cache v3 (see the PR description with the error).
I would suggest reverting to psr/cache ^1.0 || ^2.0
for version 2.x and use psr/cache ^2.0 || ^3.0
+ PHP ^8.0 for version 3.x.
What do you think on this?
Note: I'm using the library on PHP 8.1 without issues :)
@SpartakusMd yes, already had people complaining so reverted this one.
I would suggest reverting to psr/cache ^1.0 || ^2.0 for version 2.x and use psr/cache ^2.0 || ^3.0 + PHP ^8.0 for version 3.x.
That's a great idea - can you create a PR for that? I won't be able to get to it for a few days at least.
Hey @georged, I rebased the code on master. This PR contains drops support for PHP 7.4 and requires PHP 8.0. Also drops psr/cache: ^1.0 and psr/log: ^1.0 support.
It can be merged and released as version 3 to not break the code for other users.
Hey @georged. Did you have time to look at this?
@SpartakusMd we haven't merged yet but we did decide to create a separate branch min-php8.0
for php 8+ and keep 7.4 as is. The new branch will have all the changes to support psr 3.
@wizardist can you take a look how best to merge this pull request into the new branch?
Hey @georged @wizardist any plans on this?
@SpartakusMd yes there are :)
Did you check if php 80 branch is more suitable for this?
Hi @georged, the branch can run on php 8.0 but not on php 8.1 where return type hints were added. It will crash due to widening the return types in the implementation of cache 3.0.
I would suggest merging this branch into the php 8 one. WDYT?
Your commit removes 7.4 from what I can see. We can't do that as we need this for backward compatibility. @wizardist do you think we can bring relevant changes to v8 branch?
Hello @georged, @wizardist. I see there was a 4.0.0-alpha version released for which minimum php version is 8. Unfortunately there is no php8 branch anymore as I wanted to move the pr to it. Could you create it back so that I would adjust my PR?
@SpartakusMd I've [re]-created 4.x branch to support at least 8.0. Support for 7.4 dropped in that branch.
@georged I have updated the PR to target that branch. If the changes are ok, could you merge it and tag it?
Greetings! Loving the package, but it's broken with PHP8+. Is anyone going to merge these changes or should I just make my own fork?
@paclw-cory we've merged now, give it a shot!
Last commit was to have compatibility with PSR cache & log versions ^3.0. They require PHP >8.0. They also introduced typed parameters and return types. This PR comes with fixing the crashes due to incompatibility