swayok / alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea
MIT License
153 stars 24 forks source link

Laravel 9 support #34

Closed plastique closed 2 years ago

plastique commented 2 years ago

Is it expected soon or waiting for this request ?

swayok commented 2 years ago

I've published release that supports Laravel 9. Currently cannot test compatibility with Laravel 9. Lib will work with redis. But file based cache might not work because of issue you linked.

Krato commented 2 years ago

Is working with redis, but there's an error if you have this package installed and choose file cache. Flysystem has been updated.

Can you check it please?

rhurup commented 2 years ago

Is working with redis, but there's an error if you have this package installed and choose file cache. Flysystem has been updated.

Can you check it please?

Agree - Have the same issue.

RohitM-IN commented 2 years ago

I was testing it for installing but since i am still new i am getting errors

from what i saw

https://github.com/Kuratle-Group/filesystem-adapter

he as updated the cache/filesystem-adapter to support Laravel 9 in fork

I tested it by installing it if i am not wrong its should be something like

"repositories": [{
       "type": "vcs",
       "url": "https://github.com/Kuratle-Group/filesystem-adapter"
 }],
"require": {
        "cache/filesystem-adapter": "master",
},

but now when i am trying to install the latest version it gives me

Problem 1
    - swayok/alternative-laravel-cache[6.1.0, ..., 6.1.4] require psr/cache ^1.0.0 -> found psr/cache[1.0.0, 1.0.1] but the package is fixed to 2.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires swayok/alternative-laravel-cache ^6.1 -> satisfiable by swayok/alternative-laravel-cache[6.1.0, ..., 6.1.4].

i let the composer figure which version is installable by

composer require swayok/alternative-laravel-cache:*

and it installed 5.4.12 ( well i know it will not run because of update in league/flysystem )

thanks in advance :)

maciejsajdok commented 2 years ago

@RohitM-IN Seem like updating adapter is not the only thing needed. I tried to run it with L9 and seems that this repo might need an adjustment for new League/Flysystem because Class "League\Flysystem\Adapter\Local" not found : <

swayok commented 2 years ago

@gulasznikow @RohitM-IN @rhurup @plastique @Krato Update 6.1.5 released with full support for Laravel 9 and file-based cache. Try it and tell me if it works for you.

plastique commented 2 years ago

@gulasznikow @RohitM-IN @rhurup @plastique @Krato Update 6.1.5 released with full support for Laravel 9 and file-based cache. Try it and tell me if it works for you.

Working if add to composer requirements: swayok/cache-filesystem-adapter

swayok commented 2 years ago

@gulasznikow @RohitM-IN @rhurup @plastique @Krato Update 6.1.5 released with full support for Laravel 9 and file-based cache. Try it and tell me if it works for you.

Working if add to composer requirements: swayok/cache-filesystem-adapter

Good. Updated installation docs

prg-hussam commented 2 years ago

Hello

i have this issue when require swayok/cache-filesystem-adapter Laravel 9.21

Screen Shot 2022-07-22 at 10 59 59 PM
swayok commented 2 years ago

@prg-hussam It seems like some package requires psr/cache version which is not supported by many requried packages of this package (cache/adapter-common for example). And the reason is not Laravel because I currently have Laravel 9.21.6 and it installs and works normally. Check your composer.json if it has forced "psr/cachce": "^3.0" and switch it to "psr/cachce":"^1.0.0|^2.0.0|^3.0.0" or just remove it. Also update "psr/simple-cache": "^1.0.0|^2.0.0|^3.0.0" or remove it if it is in your composer.json

plastique commented 2 years ago

Hello

i have this issue when require swayok/cache-filesystem-adapter Laravel 9.21 Screen Shot 2022-07-22 at 10 59 59 PM

for example my requirements (Laravel 9.21.5) working

"require": {
        "php": "^8.0.2",
        "ext-json": "*",
        "ext-pdo": "*",
        "cache/memcached-adapter": "^1.0",
        "cache/predis-adapter": "^1.0",
        "laravel/framework": "^9.0",
        "laravel/tinker": "^2.7",
        "swayok/cache-filesystem-adapter": "*",
        "swayok/alternative-laravel-cache": "^6.1.5",
        "predis/predis": "^1.1"
    },
prg-hussam commented 2 years ago

my requirements

"require": { "php": "^8.0.2", "guzzlehttp/guzzle": "^7.2", "inertiajs/inertia-laravel": "^0.6.3", "jenssegers/agent": "^2.6", "laravel/fortify": "^1.13", "laravel/framework": "^9.21.3", "laravel/sanctum": "^2.14.1", "laravel/tinker": "^2.7", "mcamara/laravel-localization": "^1.7", "nwidart/laravel-modules": "^9.0", "prgayman/laravel-sidebar": "dev-master", "spatie/laravel-activitylog": "^4.5", "spatie/laravel-permission": "^5.5", "spatie/laravel-translatable": "^6.0", "tightenco/ziggy": "^1.4" }

prg-hussam commented 2 years ago

"swayok/cache-filesystem-adapter": "*",

worked ✅

swayok commented 2 years ago

It seems something wrong happening when you use composer require swayok/alternative-laravel-cache or composer require swayok/cache-filesystem-adapter. While adding these packages directly to composer.json and then running composer update works normally.

swayok commented 2 years ago

Ok. Solved problem with composer require swayok/alternative-laravel-cache by running composer clearcache + deleted composer.lock file.