Closed ramytamer closed 4 years ago
It' similar to my question in issue #31
I modified the install command like this:
composer require laravel-notification-channels/fcm:~2.0
This force use of v2.0.2, with ^ it will take v2.0.0 that doesn't have fix for new version of Laravel & Firebase.
@nemesiscb Same issue,
here is the output when I tried to execute:
composer require laravel-notification-channels/fcm:~2.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel-notification-channels/fcm ~2.0 -> satisfiable by laravel-notification-channels/fcm[2.0.0, 2.0.1, 2.0.2].
- Can only install one of: kreait/laravel-firebase[1.x-dev, 2.1.0].
- Can only install one of: kreait/laravel-firebase[1.x-dev, 2.1.0].
- Can only install one of: kreait/laravel-firebase[1.x-dev, 2.1.0].
- Conclusion: install kreait/laravel-firebase 1.x-dev
- Installation request for kreait/laravel-firebase ^2.1 -> satisfiable by kreait/laravel-firebase[2.1.0].
Installation failed, reverting ./composer.json to its original content.
and here is with specific version:
composer require laravel-notification-channels/fcm:2.0.2
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: kreait/laravel-firebase[1.x-dev, 2.1.0].
- Can only install one of: kreait/laravel-firebase[1.x-dev, 2.1.0].
- Can only install one of: kreait/laravel-firebase[1.x-dev, 2.1.0].
- laravel-notification-channels/fcm 2.0.2 requires kreait/laravel-firebase ^1.3 -> satisfiable by kreait/laravel-firebase[1.x-dev].
- Installation request for laravel-notification-channels/fcm 2.0.2 -> satisfiable by laravel-notification-channels/fcm[2.0.2].
- Installation request for kreait/laravel-firebase ^2.1 -> satisfiable by kreait/laravel-firebase[2.1.0].
Installation failed, reverting ./composer.json to its original content.
I still think the problem is the require
part here; I think it might need to be "kreait/laravel-firebase": "~1.3 || ~2.1",
instead of just "kreait/laravel-firebase": "^1.3",
(not sure though)
@ramytamer As long as there's no breaking changes between the versions, feel free to PR that constrant change :)
@atymic I opened a PR #36; Can you take a look at it when you have a chance?
Thanks :)
I'm facing the same issue 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.
./composer.json has been updated 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
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
I am using
kreait/laravel-firebase:^2.1
in my project and whenever I try to composer requirelaravel-notification-channels/fcm
I get an error because of the dependency version defined in the package composer.jsonHere is what I get when I run:
composer require laravel-notification-channels/fcm:^2.0
And this is what I get if I didn't specify the version:
composer require laravel-notification-channels/fcm
I am not sure what should be the appropriate solution here, should we allow version
2.1.0
forlaravel-firebase
in the composer.json file of the package?I can open a PR for this fix if that would solve this issue.