kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

Home Page:https://github.com/kreait/firebase-php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting lots of errors while instaling

brokenpieworld opened this issue · comments

Problem 1
- 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 dev-main requires kreait/firebase-php ^5.18 -> satisfiable by kreait/firebase-php[5.18.0, ..., 5.x-dev].
- kreait/firebase-php[5.14.1, ..., 5.x-dev] 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.
- Root composer.json requires kreait/laravel-firebase ^3.1 -> satisfiable by kreait/laravel-firebase[3.1.0, 3.x-dev (alias of dev-main)].

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

Laravel 8 and my composer.json as below

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.3.0",
        "laravel/framework": "^8.40",
        "laravel/sanctum": "^2.11",
        "laravel/tinker": "^2.5",
        "mailjet/mailjet-apiv3-php": "^1.5"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
        "files": [
            "app/Helper.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

From what you posted:

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.

and

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

From what you posted:

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.

and

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

i have some problem with you, i use the option -W, but still error

Problem 1
- Root composer.json requires laravel/framework ^8.40, found laravel/framework[v8.40.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- laravel/tinker is locked to version v2.6.1 and an update of this package was not requested.
- laravel/tinker v2.6.1 requires illuminate/console ^6.0|^7.0|^8.0 -> found illuminate/console[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 3
- laravel/sail is locked to version v1.8.6 and an update of this package was not requested.
- laravel/sail v1.8.6 requires illuminate/console ^8.0|^9.0 -> found illuminate/console[dev-master, v8.0.0, ..., 8.x-dev, 9.x-dev (alias of dev-master)] but these were not loaded, likely because it conflicts with another require.
Problem 4
- facade/flare-client-php 1.8.1 requires illuminate/pipeline ^5.5|^6.0|^7.0|^8.0 -> found illuminate/pipeline[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- facade/ignition 2.11.0 requires facade/flare-client-php ^1.6 -> satisfiable by facade/flare-client-php[1.8.1].
- facade/ignition is locked to version 2.11.0 and an update of this package was not requested.

this my composer.json

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}

New releases of kreait/firebase-php and kreait/firebase-tokens-php have been released in the past 12 hours, perhaps it works if you try again.

The output of your composer runs show that there seems to be some sort of conflict, but I'm not sure what it is.

What you could try, is deleting the vendor directory and the composer.lock file and try I fresh composer update afterwards - it's like using a very big hammer but it worked for me in the past 😅

Update PHP to 7.4 and use -W. I had this problem with PHP 7.3 with this and other kreait repos.

If you're not on PHP 7.4, updating it is always a good idea 😅. However - staying on PHP 7.3 or even 7.2 should normally work as well with this package - the only drawback is that you won't get past version 5.19 of the SDK because newer versions require PHP 7.4.

But updating to PHP 7.4 is the best choice, of course! 👍

New releases of kreait/firebase-php and kreait/firebase-tokens-php have been released in the past 12 hours, perhaps it works if you try again.

The output of your composer runs show that there seems to be some sort of conflict, but I'm not sure what it is.

What you could try, is deleting the vendor directory and the composer.lock file and try I fresh composer update afterwards - it's like using a very big hammer but it worked for me in the past

its work thanks, just info i using php 8 not 7.3 lmao

This should work.
composer require kreait/laravel-firebase --with-all-dependencies
if that doesn't work delete composer.lock and try again.

It should be installed successfully.

any solve about this problem???

This should work.
composer require kreait/laravel-firebase --with-all-dependencies
if that doesn't work delete composer.lock and try again.

It should be installed successfully.

Thanks .. It works

This should work.
composer require kreait/laravel-firebase --with-all-dependencies
if that doesn't work delete composer.lock and try again.

It should be installed successfully.

This worked. Thanks

composer require kreait/laravel-firebase --with-all-dependencies

This should work. composer require kreait/laravel-firebase --with-all-dependencies if that doesn't work delete composer.lock and try again.

It should be installed successfully.

Worked for me. I had to uncomment sodium extension in php.ini though. I am using php 8.2 and laravel 10