kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
1.05k stars 169 forks source link

Type error: Argument 1 passed to Kreait\Firebase\Factory::withVerifierCache() must be an instance of Psr\SimpleCache\CacheInterface, instance of Illuminate\Cache\Repository given #1

Closed sujeet-agrahari closed 5 years ago

sujeet-agrahari commented 5 years ago

I am using laravel 5.2 and the error is coming from below file. vendor\kreait\laravel-firebase\src\ServiceProvider.php on line 55.

if ($cacheStore = $config['cache_store'] ?? null) {
                $factory = $factory->withVerifierCache(
                    $app->make('cache')->store($cacheStore)// from here
                );
            }
jeromegamez commented 5 years ago

This package needs Laravel 5.8 to work properly with cache (see https://github.com/laravel/framework/pull/20194). I will add this information to the README.

What you could try is disabling the cache, by first publishing the config for the package with

php artisan vendor:publish --provider="Kreait\Laravel\Firebase\ServiceProvider" --tag=config

and then setting the cache_store setting to null.

sujeet-agrahari commented 5 years ago

@jeromegamez Thanks fixed. I just set FIREBASE_CACHE_STORE=null in .env file.

jeromegamez commented 5 years ago

@Lordofcodes Please keep in mind that you will now have to stay on 1.0.0 of the release forever 😅 (or until you upgrade your Laravel application to 5.8)

sujeet-agrahari commented 5 years ago

@jeromegamez Not a problem. Thank you so much.👏😊