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

Your requirements could not be resolved to an installable set of packages #89

Closed lucianobosco closed 2 years ago

lucianobosco commented 3 years ago

I'm facing an error under Laravel Sail (Laravel 8, PHP 8) by running composer require laravel-notification-channels/fcm:~2.0 Any help will be appreciated.

Running composer update laravel-notification-channels/fcm
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel-notification-channels/fcm[2.2.0, ..., 2.2.1] require kreait/laravel-firebase ^1.3 || ^2.1 || ^3.0 -> satisfiable by kreait/laravel-firebase[1.3.0, 1.4.0, 1.5.0, 2.1.0, ..., 2.4.0, 3.0.0, 3.1.0, 3.x-dev (alias of dev-main)].
    - laravel-notification-channels/fcm[2.1.0, ..., 2.1.3] require kreait/laravel-firebase ^1.3 || ^2.1 -> satisfiable by kreait/laravel-firebase[1.3.0, 1.4.0, 1.5.0, 2.1.0, ..., 2.4.0].
    - kreait/laravel-firebase 3.x-dev is an alias of kreait/laravel-firebase dev-main and thus requires it to be installed too.
    - kreait/laravel-firebase 3.1.0 requires kreait/firebase-php ^5.14.1 -> satisfiable by kreait/firebase-php[5.14.1, ..., 5.x-dev].
    - kreait/laravel-firebase 3.0.0 requires kreait/firebase-php ^5.11.0 -> satisfiable by kreait/firebase-php[5.11.0, ..., 5.x-dev].
    - kreait/laravel-firebase 2.4.0 requires kreait/firebase-php ^5.8.1 -> satisfiable by kreait/firebase-php[5.8.1, ..., 5.x-dev].
    - kreait/laravel-firebase dev-main requires kreait/firebase-php ^5.18 -> satisfiable by kreait/firebase-php[5.18.0, ..., 5.x-dev].
    - kreait/firebase-php[5.21.0, ..., 5.x-dev] require google/auth ^1.16 -> satisfiable by google/auth[v1.16.0].
    - laravel-notification-channels/fcm[2.0.0, ..., 2.0.3] require guzzlehttp/guzzle ^6.2 -> found guzzlehttp/guzzle[6.2.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0.1).
    - laravel-notification-channels/fcm 2.0.4 requires illuminate/notifications ~5.6 || ~6.0 || ~7.0 -> found illuminate/notifications[v5.6.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but these were not loaded, likely because it conflicts with another require.
    - google/auth v1.16.0 requires guzzlehttp/psr7 ^1.2 -> found guzzlehttp/psr7[1.2.0, ..., 1.x-dev] 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.
    - kreait/firebase-php 5.8.1 requires php ^7.2 -> your php version (8.0.8) does not satisfy that requirement.
    - kreait/laravel-firebase[2.2.0, ..., 2.3.1] require php ^7.2 -> your php version (8.0.8) does not satisfy that requirement.
    - kreait/firebase-php 5.9.0 requires lcobucci/jwt ^3.3.1 -> found lcobucci/jwt[3.3.1, ..., 3.4.x-dev] but the package is fixed to 4.1.4 (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.
    - kreait/firebase-php[5.10.0, ..., 5.20.1] require guzzlehttp/psr7 ^1.7 -> found guzzlehttp/psr7[1.7.0, ..., 1.x-dev] 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.
    - kreait/laravel-firebase[1.3.0, ..., 1.4.0] require illuminate/contracts ^5.8|^6.0 -> found illuminate/contracts[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev] but these were not loaded, likely because it conflicts with another require.
    - kreait/laravel-firebase[1.5.0, 2.1.0] require illuminate/contracts ^5.8|^6.0|^7.0 -> found illuminate/contracts[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires laravel-notification-channels/fcm ~2.0 -> satisfiable by laravel-notification-channels/fcm[2.0.0, ..., 2.2.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

EDIT: I've made the install work by using the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Not sure if this is a good practice or I'm doing something wrong here. composer require laravel-notification-channels/fcm:~2.0 --with-all-dependencies

the-dijkstra commented 3 years ago

@lucianobosco

Try this:

composer require laravel-notification-channels/fcm
ankurk91 commented 2 years ago

Try this

 composer require laravel-notification-channels/fcm:~2.0 -W

Notice the -W flag

nhtahoe commented 2 years ago

I'm getting this:

composer require laravel-notification-channels/fcm:~2.0 -W
./composer.json has been updated
Running composer update laravel-notification-channels/fcm --with-all-dependencies
Loading composer repositories with paUpdating dependencies                                 
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel-notification-channels/fcm[2.0.0, ..., 2.0.3] require guzzlehttp/guzzle ^6.2 -> found guzzlehttp/guzzle[6.2.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0.1).
    - laravel-notification-channels/fcm[2.0.4, ..., 2.1.3] require kreait/laravel-firebase ^1.3 || ^2.1 -> found kreait/laravel-firebase[1.3.0, 1.4.0, 1.5.0, 2.1.0, ..., 2.4.0] but it conflicts with your root composer.json require (^4.0).
    - laravel-notification-channels/fcm[2.2.0, ..., 2.2.1] require kreait/laravel-firebase ^1.3 || ^2.1 || ^3.0 -> found kreait/laravel-firebase[dev-main, 1.3.0, 1.4.0, 1.5.0, 2.1.0, ..., 2.4.0, 3.0.0, ..., 3.x-dev (alias of dev-main)] but it conflicts with your root composer.json require (^4.0).
    - Root composer.json requires laravel-notification-channels/fcm ~2.0 -> satisfiable by laravel-notification-channels/fcm[2.0.0, ..., 2.2.1].
beyondthepale commented 2 years ago

Tried to install this package today. Laravel 8, PHP 8, fcm 2.4 This is the error message Problem 1

Alila-kevin commented 1 year ago

am also getting below problem

Your requirements could not be resolved to an installable set of packages.

Problem 1