laravel-notification-channels / fcm

Firebase Cloud Messaging (FCM) notifications channel for Laravel
https://laravel-notification-channels.com/
MIT License
491 stars 126 forks source link

Laravel 10.x Compatibility #135

Closed laravel-shift closed 1 year ago

laravel-shift commented 1 year ago

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 9.x.

Before merging, you need to:

If you do find an issue, please report it by commenting on this PR to help improve future automation.

laravel-shift commented 1 year ago

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^9.5.10. If you would like to also upgrade your tests, you may run the PHPUnit 9 Shift for free.

laravel-shift commented 1 year ago

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.

To do so, temporarily add Shift's fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/fcm.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "laravel-notification-channels/fcm": "dev-l10-compatibility",
    }
}

Finally, run: composer update

dwightwatson commented 1 year ago

I'd love to run the PHPUnit 9 Shift, but doesn't seem easy to do from the dashboard - only shows my personal repos. Would be great if I could just past in this repo as it's public.

Still - thank you!

jasonmccreary commented 1 year ago

@dwightwatson, you can run a Shift against any repo. Just paste in the URL. Email support if you're still having an issue. 👍

Zubairsoft commented 1 year ago

@laravel-shift I'm trying to use this package in my Laravel 10 project, but I'm encountering an error related to compatibility. I believe there is a conflict between the requirements of package and Laravel 10. Can you please help me resolve this issue?

{
    "require": {
        "php": "^8.1",
        "laravel/framework": "^10.0",
        "laravel-notification-channels/fcm": "dev-l10-compatibility"
        },
        "repositories": [
            {
                "type": "vcs",
                "url": "https://github.com/laravel-shift/fcm.git"
            }
        ],
    "minimum-stability": "dev"
    ,
    "prefer-stable": true
}
composer i
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies                                 
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - kreait/firebase-php[4.30.0, ..., 4.x-dev] require php ^7.0 -> your php version (8.1.16) does not satisfy that requirement.
    - kreait/laravel-firebase[2.2.0, ..., 2.3.1] require php ^7.2 -> your php version (8.1.16) does not satisfy that requirement.
    - illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.1.16) does not satisfy that requirement.
    - kreait/laravel-firebase[3.1.0, ..., 3.2.0] require php ^7.2|~8.0.0 -> your php version (8.1.16) does not satisfy that requirement.
    - illuminate/support[v5.8.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.1.16) does not satisfy that requirement.
    - illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.1.16) does not satisfy that requirement.
    - illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.1.16) does not satisfy that requirement.
    - Root composer.json requires laravel-notification-channels/fcm dev-l10-compatibility -> satisfiable by laravel-notification-channels/fcm[dev-l10-compatibility].
    - Conclusion: don't install laravel/framework v10.0.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.0.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v10.0.3 (conflict analysis result)
    - kreait/laravel-firebase 1.5.0 requires kreait/firebase-php ^4.40.1 -> satisfiable by kreait/firebase-php[4.40.1, ..., 4.x-dev].
    - kreait/laravel-firebase 1.4.0 requires kreait/firebase-php ^4.40.0 -> satisfiable by kreait/firebase-php[4.40.0, ..., 4.x-dev].
    - kreait/laravel-firebase 1.3.0 requires kreait/firebase-php ^4.38.1 -> satisfiable by kreait/firebase-php[4.38.1, ..., 4.x-dev].
    - kreait/laravel-firebase 1.2.0 requires kreait/firebase-php ^4.35.0 -> satisfiable by kreait/firebase-php[4.35.0, ..., 4.x-dev].
    - kreait/laravel-firebase 1.1.0 requires kreait/firebase-php ^4.32.0 -> satisfiable by kreait/firebase-php[4.32.0, ..., 4.x-dev].
    - kreait/laravel-firebase 1.0.1 requires kreait/firebase-php ^4.30.1 -> satisfiable by kreait/firebase-php[4.30.1, ..., 4.x-dev].
    - kreait/laravel-firebase 1.0.0 requires kreait/firebase-php ^4.30 -> satisfiable by kreait/firebase-php[4.30.0, ..., 4.x-dev].
    - Conclusion: don't install laravel/framework v10.0.0 (conflict analysis result)
    - laravel-notification-channels/fcm dev-l10-compatibility requires kreait/laravel-firebase ^1.3 || ^2.1 || ^3.0 || ^4.0|^1.0 -> satisfiable by kreait/laravel-firebase[1.0.0, ..., 1.5.0, 2.1.0, ..., 2.4.0, 3.0.0, ..., 3.4.0, 4.0.0, 4.1.0, 4.2.0].
    - kreait/laravel-firebase[4.1.0, ..., 4.2.0] require illuminate/support ^8.0 || ^9.0 -> satisfiable by illuminate/support[v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev].
    - kreait/laravel-firebase 4.0.0 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[v8.0.0, ..., 8.x-dev].
    - kreait/laravel-firebase[3.0.0, ..., 3.4.0] require illuminate/support ^6.0|^7.0|^8.0 -> satisfiable by illuminate/support[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev].
    - kreait/laravel-firebase 2.4.0 requires illuminate/support ^5.8|^6.0|^7.0|^8.0 -> satisfiable by illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev].
    - kreait/laravel-firebase 2.1.0 requires illuminate/support ^5.8|^6.0|^7.0 -> satisfiable by illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev].
    - Only one of these can be installed: illuminate/support[v5.6.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev], laravel/framework[v10.0.0, ..., 10.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
    - Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., 10.x-dev].
dwightwatson commented 1 year ago

Just use the tagged ^3.0 release which suggests the newer version of kreait/laravel-firebase. You shouldn't be using the dev branch or need to reference the Laravel Shift repo.