Closed mudasserzahid closed 4 years ago
Hi. There was an incorrect package name in readme (already fixed).
Correct one is: swayok/alternative-laravel-cache
(note dashes).
I haven't tested this package in Lumen so it might not work as intended there. Please report here any issues you encounter and I will fix it asap. Or make pull request =)
okay, sure I'll continue developing my app using specified package. If there will be an issue, I'll let you know.
FYI
Here how I fixed specified lib in Laravel Lumen 5.6
. by using 5.4.*
version.
First issue was as;
Class path.storage does not exist
specified exception was resolved by creating instance in bootstrap/app.php
$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');
$app->instance('path.storage', app()->basePath() . DIRECTORY_SEPARATOR . 'storage');
2nd issue was as;
Target [Illuminate\Contracts\Routing\ResponseFactory] is not instantiable on calling Response
and specified exception was resolved by creating a method in AppServiceProvider
as;
public function register()
{
$this->app->singleton('Illuminate\Contracts\Routing\ResponseFactory', function ($app) {
return new \Illuminate\Routing\ResponseFactory(
$app['Illuminate\Contracts\View\Factory'], $app['Illuminate\Routing\Redirector']
);
});
}
and now it's working fine :)
Nice. I will dig into Lumen to understand differences in configurations.
Currently I've found that configs should be loaded manually using $app->configure('path');
for example. Not sure there are such config already bundled in lumen though.
This is still relevant for Lumen 6, but the latest version has broken this for Lumen by adding \App::version to line 310 in AlternativeCacheStore in this commit https://github.com/swayok/alternative-laravel-cache/commit/5affc1ce792d4030e66d4bbc1d19cc62450b6007
This line needs to be changed to app()->version for the code to work in Lumen.
Can we use this package in Lumen 5.6? If yes then please let me know because the composer is unable to locate specified package on my side.