Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Laravel 8 #203

Open
exzachlyvv opened this issue Oct 5, 2020 · 6 comments
Open

Laravel 8 #203

exzachlyvv opened this issue Oct 5, 2020 · 6 comments

Comments

@exzachlyvv
Copy link

After upgrading to Laravel 8, seeing this error:

Undefined property: LaravelFCM\FCMManager::$app

@ArabAgile
Copy link

Quick (dirty-way) fix (until official library upgrade) is to change FCMManager.php to:

class FCMManager extends Manager
{
    public function getDefaultDriver()
    {
        return config('fcm.driver');
    }

    protected function createHttpDriver()
    {
        $config = config('fcm.http');

        return new Client(['timeout' => $config[ 'timeout' ]]);
    }
}

@zach-lum-fm
Copy link

I have a fork with this fix in it if anyone wants to use it:

https://github.com/zach-lum-fm/Laravel-FCM

In composer.json:

"repositories": [
    {
        "type": "vcs",
        "url":  "[email protected]:zach-lum-fm/laravel-fcm.git"
    }
],

@andynguyen-adamo
Copy link

Hey @zach-lum-fm
I've added your repo to my composer.json
"repositories": [ { "type": "package", "package": { "name": "zach-lum-fm/laravel-fcm", "version": "2", "type": "git", "source": { "url": "https://github.com/zach-lum-fm/Laravel-FCM", "type": "git", "reference": "master" } } } ],
and composer cloned the source code to vendor/zach-lum-fm/laravel-fcm

But i got an error

Class 'LaravelFCM\FCMServiceProvider' not found

How to let Laravel recognize our vendor/zach-lum-fm/laravel-fcm ?

@TaPTaK
Copy link

TaPTaK commented Nov 17, 2020

Hey @zach-lum-fm
I've added your repo to my composer.json
"repositories": [ { "type": "package", "package": { "name": "zach-lum-fm/laravel-fcm", "version": "2", "type": "git", "source": { "url": "https://github.com/zach-lum-fm/Laravel-FCM", "type": "git", "reference": "master" } } } ],
and composer cloned the source code to vendor/zach-lum-fm/laravel-fcm

But i got an error

Class 'LaravelFCM\FCMServiceProvider' not found

How to let Laravel recognize our vendor/zach-lum-fm/laravel-fcm ?

replace "repositories": [ { "type": "vcs", "url": "[email protected]:zach-lum-fm/laravel-fcm.git" } ], and in "require" section "apility/laravel-fcm": "dev-master"

@andynguyen-adamo
Copy link

Amazing! It worked.
Thank you so much @TaPTaK

@hemantachhami19
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants