kreait / laravel-firebase

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

Dependency issue preventing installation #227

Closed datle2001 closed 2 months ago

datle2001 commented 2 months ago

Describe the bug

I could not install laravel-firebase due to dependency conflict.

Installed packages

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^8.0.2",
        "guzzlehttp/guzzle": "^7.2",
        "illuminate/auth": "*",
        "laravel/framework": "^9.19",
        "laravel/sanctum": "^3.0",
        "laravel/tinker": "^2.7",
        "stripe/stripe-php": "*",
        "tymon/jwt-auth": "^2.0.0"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/pint": "^1.0",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1",
        "phpunit/phpunit": "^9.5.10",
        "spatie/laravel-ignition": "^1.0"
    },
    "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-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force",
            "@php artisan ide-helper:generate",
            "@php artisan ide-helper:models",
            "@php artisan ide-helper:meta"
        ],
        "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,
        "allow-plugins": {
            "pestphp/pest-plugin": true
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}

PHP version and extensions

composer               2.5.1    Composer package
composer-plugin-api    2.3.0    The Composer Plugin API
composer-runtime-api   2.2.2    The Composer Runtime API
ext-bcmath             8.2.12   The bcmath PHP extension
ext-bz2                8.2.12   The bz2 PHP extension
ext-calendar           8.2.12   The calendar PHP extension
ext-ctype              8.2.12   The ctype PHP extension
ext-curl               8.2.12   The curl PHP extension
ext-date               8.2.12   The date PHP extension
ext-dom                20031129 The dom PHP extension
ext-exif               8.2.12   The exif PHP extension
ext-fileinfo           8.2.12   The fileinfo PHP extension
ext-filter             8.2.12   The filter PHP extension
ext-ftp                8.2.12   The ftp PHP extension
ext-gettext            8.2.12   The gettext PHP extension
ext-hash               8.2.12   The hash PHP extension
ext-iconv              8.2.12   The iconv PHP extension
ext-json               8.2.12   The json PHP extension
ext-libxml             8.2.12   The libxml PHP extension
ext-mbstring           8.2.12   The mbstring PHP extension
ext-mysqli             8.2.12   The mysqli PHP extension
ext-mysqlnd            0        The mysqlnd PHP extension (actual version: mysqlnd 8.2.12)
ext-openssl            8.2.12   The openssl PHP extension
ext-pcre               8.2.12   The pcre PHP extension
ext-pdo                8.2.12   The PDO PHP extension
ext-pdo_mysql          8.2.12   The pdo_mysql PHP extension
ext-pdo_sqlite         8.2.12   The pdo_sqlite PHP extension
ext-phar               8.2.12   The Phar PHP extension
ext-random             8.2.12   The random PHP extension
ext-readline           8.2.12   The readline PHP extension
ext-reflection         8.2.12   The Reflection PHP extension
ext-session            8.2.12   The session PHP extension
ext-simplexml          8.2.12   The SimpleXML PHP extension
ext-spl                8.2.12   The SPL PHP extension
ext-tokenizer          8.2.12   The tokenizer PHP extension
ext-xml                8.2.12   The xml PHP extension
ext-xmlreader          8.2.12   The xmlreader PHP extension
ext-xmlwriter          8.2.12   The xmlwriter PHP extension
ext-zlib               8.2.12   The zlib PHP extension
lib-bz2                1.0.8    The bz2 library
lib-curl               8.4.0    The curl library
lib-curl-libssh2       1.10.0   curl libssh2 version
lib-curl-openssl       3.0.11   curl OpenSSL version (3.0.11)
lib-curl-zlib          1.2.12   curl zlib version
lib-date-timelib       2022.09  date timelib version
lib-date-zoneinfo      2023.3   zoneinfo ("Olson") database for date
lib-fileinfo-libmagic  540      fileinfo libmagic version
lib-iconv              1.16     The iconv library
lib-libxml             2.10.3   libxml library version
lib-mbstring-libmbfl   1.3.2    mbstring libmbfl version
lib-mbstring-oniguruma 6.9.8    mbstring oniguruma version
lib-openssl            3.0.11   OpenSSL 3.0.11 19 Sep 2023
lib-pcre               10.40    The pcre library
lib-pcre-unicode       14.0.0   PCRE Unicode version support
lib-pdo_sqlite-sqlite  3.39.2   The pdo_sqlite-sqlite library
lib-zlib               1.2.12   The zlib library
php                    8.2.12   The PHP interpreter
php-64bit              8.2.12   The PHP interpreter, 64bit
php-ipv6               8.2.12   The PHP interpreter, with IPv6 support
php-zts                8.2.12   The PHP interpreter, with Zend Thread Safety

Steps to reproduce the issue.

composer require kreait/laravel-firebase

Error message/Stack trace

Problem 1
    - kreait/laravel-firebase 1.0.0 requires kreait/firebase-php ^4.30 -> satisfiable by kreait/firebase-php[4.30.0, ..., 4.44.0].
    - kreait/laravel-firebase 4.2.0 requires kreait/firebase-php ^6.7 -> satisfiable by kreait/firebase-php[6.7.0, ..., 
6.9.6].
    - kreait/laravel-firebase 4.1.0 requires kreait/firebase-php ^6.0 -> satisfiable by kreait/firebase-php[6.0.0, ..., 
6.9.6].
    - kreait/laravel-firebase[5.9.0, ..., 5.9.1] require kreait/firebase-php ^7.13 -> satisfiable by kreait/firebase-php[7.13.0, 7.13.1].
    - kreait/laravel-firebase[5.0.0, ..., 5.8.0] require kreait/firebase-php ^7.0 -> satisfiable by kreait/firebase-php[7.0.0, ..., 7.13.1].
    - kreait/firebase-php[4.30.0, ..., 4.44.0] require php ^7.0 -> your php version (8.2.12) does not satisfy that requirement.
    - kreait/laravel-firebase[1.0.1, ..., 1.4.0] require illuminate/contracts ^5.8|^6.0 -> found illuminate/contracts[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require. 
    - kreait/laravel-firebase[1.5.0, 2.0.0, ..., 2.1.0] require illuminate/contracts ^5.8|^6.0|^7.0 -> found illuminate/contracts[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require.
    - kreait/laravel-firebase[2.2.0, ..., 2.3.1] require php ^7.2 -> your php version (8.2.12) does not satisfy that requirement.
    - kreait/laravel-firebase 2.4.0 requires illuminate/contracts ^5.8|^6.0|^7.0|^8.0 -> found illuminate/contracts[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely 
because it conflicts with another require.
    - kreait/laravel-firebase[3.0.0, ..., 3.4.0] require illuminate/contracts ^6.0|^7.0|^8.0 -> found illuminate/contracts[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - kreait/laravel-firebase[3.1.0, ..., 3.2.0] require php ^7.2|~8.0.0 -> your php version (8.2.12) does not satisfy that requirement.
    - kreait/laravel-firebase 4.0.0 requires illuminate/contracts ^8.0 -> found illuminate/contracts[v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - kreait/firebase-php[6.0.0, ..., 6.9.6] require lcobucci/jwt ^4.1 -> found lcobucci/jwt[4.1.0, ..., 4.3.0] but the 
package is fixed to 4.0.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[7.0.0, ..., 7.0.3] require lcobucci/jwt ^4.2.1 -> found lcobucci/jwt[4.2.1, 4.3.0] but the package is fixed to 4.0.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[7.1.0, ..., 7.6.0] require lcobucci/jwt ^4.3.0|^5.0 -> found lcobucci/jwt[4.3.0, 5.0.0, 5.1.0, 5.2.0, 5.3.0] but the package is fixed to 4.0.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[7.7.0, ..., 7.13.1] require guzzlehttp/promises ^2.0 -> found guzzlehttp/promises[2.0.0, 2.0.1, 2.0.2, 2.0.3] but the package is fixed to 1.5.2 (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 * -> satisfiable by kreait/laravel-firebase[1.0.0, ..., 1.5.0, 2.0.0, ..., 2.4.0, 3.0.0, ..., 3.4.0, 4.0.0, 4.1.0, 4.2.0, 5.0.0, ..., 5.9.1].

Additional information

No response

jeromegamez commented 2 months ago

Try composer require -W ... to update packages related to the SDK as well.

Also, I've seen tymon/jwt-auth as a reason for conflicts a couple of times in the past (it's been some time, though).

General composer dependency management is out of scope of this library and my free Open Source support, so I'll close this issue; I hope you understand, thanks! 🙏🏻