kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
994 stars 163 forks source link

getting lots of errors while instaling #95

Closed brokenpieworld closed 2 years ago

brokenpieworld commented 2 years ago

Problem 1

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

brokenpieworld commented 2 years ago

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
}
jeromegamez commented 2 years ago

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.

prasagungg commented 2 years ago

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

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 }

jeromegamez commented 2 years ago

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 😅

Ontr commented 2 years ago

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

jeromegamez commented 2 years ago

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! 👍

prasagungg commented 2 years ago

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

Creative-Dotlogics commented 2 years ago

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.

boyet007 commented 2 years ago

any solve about this problem???

akashc294 commented 2 years ago

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

marvel12isaac commented 2 years ago

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

patooz commented 1 year ago

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