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

Unable to install kreait/laravel-firebase on Laravel 11 project #221

Closed paradoxe35 closed 1 month ago

paradoxe35 commented 1 month ago

Describe the bug

Unable to run composer require kreait/laravel-firebase on Laravel 11 project

Installed packages

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The skeleton application for the Laravel framework.",
    "keywords": ["laravel", "framework"],
    "license": "MIT",
    "require": {
        "php": "^8.2",
        "appstract/laravel-opcache": "^4.0",
        "filament/filament": "^3.2",
        "flowframe/laravel-trend": "^0.2.0",
        "guzzlehttp/guzzle": "^7.8",
        "laravel/framework": "^11.0",
        "laravel/pulse": "^1.2",
        "laravel/sanctum": "^4.0",
        "laravel/tinker": "^2.9",
        "league/flysystem-aws-s3-v3": "^3.0",
        "predis/predis": "^2.0",
        "propaganistas/laravel-phone": "^5.2",
        "spatie/laravel-backup": "^8.6",
        "twilio/sdk": "^8.0"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.13",
        "barryvdh/laravel-ide-helper": "^3.0",
        "fakerphp/faker": "^1.23",
        "laravel/pint": "^1.13",
        "laravel/sail": "^1.26",
        "mockery/mockery": "^1.6",
        "nunomaduro/collision": "^8.0",
        "pestphp/pest": "^2.34",
        "pestphp/pest-plugin-laravel": "^2.3",
        "spatie/laravel-ignition": "^2.4"
    },
    "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",
            "@php artisan filament:upgrade"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi",
            "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
            "@php artisan migrate --graceful --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true,
            "php-http/discovery": true
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}

PHP version and extensions

composer               2.6.6    Composer package
composer-plugin-api    2.6.0    The Composer Plugin API
composer-runtime-api   2.2.2    The Composer Runtime API
ext-bcmath             8.3.2    The bcmath PHP extension
ext-bz2                8.3.2    The bz2 PHP extension
ext-calendar           8.3.2    The calendar PHP extension
ext-ctype              8.3.2    The ctype PHP extension
ext-curl               8.3.2    The curl PHP extension
ext-date               8.3.2    The date PHP extension
ext-dom                20031129 The dom PHP extension
ext-exif               8.3.2    The exif PHP extension
ext-fileinfo           8.3.2    The fileinfo PHP extension
ext-filter             8.3.2    The filter PHP extension
ext-gd                 8.3.2    The gd PHP extension
ext-gettext            8.3.2    The gettext PHP extension
ext-hash               8.3.2    The hash PHP extension
ext-iconv              8.3.2    The iconv PHP extension
ext-intl               8.3.2    The intl PHP extension
ext-json               8.3.2    The json PHP extension
ext-libxml             8.3.2    The libxml PHP extension
ext-mbstring           8.3.2    The mbstring PHP extension
ext-mysqli             8.3.2    The mysqli PHP extension
ext-mysqlnd            0        The mysqlnd PHP extension (actual version: mysqlnd 8.3.2)
ext-openssl            8.3.2    The openssl PHP extension
ext-pcntl              8.3.2    The pcntl PHP extension
ext-pcre               8.3.2    The pcre PHP extension
ext-pdo                8.3.2    The PDO PHP extension
ext-pdo_mysql          8.3.2    The pdo_mysql PHP extension
ext-pdo_pgsql          8.3.2    The pdo_pgsql PHP extension
ext-pdo_sqlite         8.3.2    The pdo_sqlite PHP extension
ext-pgsql              8.3.2    The pgsql PHP extension
ext-phar               8.3.2    The Phar PHP extension
ext-posix              8.3.2    The posix PHP extension
ext-random             8.3.2    The random PHP extension
ext-readline           8.3.2    The readline PHP extension
ext-reflection         8.3.2    The Reflection PHP extension
ext-session            8.3.2    The session PHP extension
ext-shmop              8.3.2    The shmop PHP extension
ext-simplexml          8.3.2    The SimpleXML PHP extension
ext-soap               8.3.2    The soap PHP extension
ext-sockets            8.3.2    The sockets PHP extension
ext-spl                8.3.2    The SPL PHP extension
ext-sqlite3            8.3.2    The sqlite3 PHP extension
ext-swoole             5.1.1    The swoole PHP extension
ext-sysvmsg            8.3.2    The sysvmsg PHP extension
ext-sysvsem            8.3.2    The sysvsem PHP extension
ext-sysvshm            8.3.2    The sysvshm PHP extension
ext-tokenizer          8.3.2    The tokenizer PHP extension
ext-xml                8.3.2    The xml PHP extension
ext-xmlreader          8.3.2    The xmlreader PHP extension
ext-xmlwriter          8.3.2    The xmlwriter PHP extension
ext-xsl                8.3.2    The xsl PHP extension
ext-zend-opcache       8.3.2    The Zend OPcache PHP extension
ext-zip                1.22.3   The zip PHP extension
ext-zlib               8.3.2    The zlib PHP extension
lib-bz2                1.0.8    The bz2 library
lib-curl               7.81.0   The curl library
lib-curl-gnutls        3.7.3    curl gnutls version (3.7.3)
lib-curl-libssh        0.9.6    curl libssh version
lib-curl-zlib          1.2.11   curl zlib version
lib-date-timelib       2022.10  date timelib version
lib-date-zoneinfo      2023.4   zoneinfo ("Olson") database for date
lib-fileinfo-libmagic  543      fileinfo libmagic version
lib-gd                 2.0.35   The gd library
lib-gd-freetype        2.11.1   freetype version for gd
lib-gd-libjpeg         8.0      libjpeg version for gd
lib-gd-libpng          1.6.37   libpng version for gd
lib-iconv              2.35     The iconv library
lib-icu                70.1     The ICU unicode and globalization support library
lib-icu-cldr           40       ICU CLDR project version
lib-icu-unicode        14.0.0   ICU unicode version
lib-icu-zoneinfo       2024.1   zoneinfo ("Olson") database for icu
lib-libxml             2.9.14   libxml library version
lib-libxslt            1.1.34   The libxslt library
lib-libxslt-libxml     2.9.13   libxml version libxslt is compiled against
lib-mbstring-libmbfl   1.3.2    mbstring libmbfl version
lib-mbstring-oniguruma 6.9.7    mbstring oniguruma version
lib-openssl            3.0.2    OpenSSL 3.0.2 15 Mar 2022
lib-pcre               10.42    The pcre library
lib-pcre-unicode       14.0.0   PCRE Unicode version support
lib-pdo_pgsql-libpq    16.2     libpq for pdo_pgsql
lib-pdo_sqlite-sqlite  3.37.2   The pdo_sqlite-sqlite library
lib-pgsql-libpq        16.2     libpq for pgsql
lib-sqlite3-sqlite     3.37.2   The sqlite3-sqlite library
lib-zip-libzip         1.7.3    The zip-libzip library
lib-zlib               1.2.11   The zlib library
php                    8.3.2    The PHP interpreter
php-64bit              8.3.2    The PHP interpreter, 64bit
php-ipv6               8.3.2    The PHP interpreter, with IPv6 support

Steps to reproduce the issue.

composer require -W kreait/laravel-firebase

Error message/Stack trace

Problem 1
    - kreait/laravel-firebase 5.8.0 requires kreait/firebase-php ^7.0 -> satisfiable by kreait/firebase-php[7.0.0, ..., 7.12.0].
    - kreait/laravel-firebase 1.0.0 requires kreait/firebase-php ^4.30 -> satisfiable by kreait/firebase-php[4.30.0, ..., 4.44.0].
    - kreait/firebase-php[7.9.0, ..., 7.12.0] require lcobucci/jwt ^4.3.0|^5.0 -> satisfiable by lcobucci/jwt[4.3.0, 5.0.0, 5.1.0, 5.2.0, 5.3.0].
    - kreait/firebase-php[4.30.0, ..., 4.38.1] require guzzlehttp/guzzle ^6.2.1 -> found guzzlehttp/guzzle[6.2.1, ..., 6.5.8] but it conflicts with your root composer.json require (^7.8).
    - 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/firebase-php[4.39.0, ..., 4.44.0] require php ^7.0 -> your php version (8.3.2) does not satisfy that requirement.
    - 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.3.2) 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.3.2) 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/laravel-firebase[4.1.0, ..., 4.2.0] require illuminate/contracts ^8.0 || ^9.0 -> found illuminate/contracts[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
    - kreait/laravel-firebase[5.0.0, ..., 5.4.0] require php ~8.1.0 || ~8.2.0 -> your php version (8.3.2) does not satisfy that requirement.
    - lcobucci/jwt 5.0.0 require php ~8.1.0 || ~8.2.0 -> your php version (8.3.2) does not satisfy that requirement.
    - kreait/laravel-firebase[5.5.0, ..., 5.7.0] require illuminate/contracts ^9.0 || ^10.0 -> found illuminate/contracts[v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.12] but these were not loaded, likely because it conflicts with another require.
    - lcobucci/jwt[4.3.0, 5.1.0, ..., 5.3.0] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
    - kreait/firebase-php[7.0.0, ..., 7.8.0] require php ~8.1.0|~8.2.0 -> your php version (8.3.2) does not satisfy that requirement.
    - 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.8.0].

To enable extensions, verify that they are enabled in your .ini files:
    - /home/ubuntu/.phpbrew/php/php-8.3.2/etc/cli/php.ini
    - /home/ubuntu/.phpbrew/php/php-8.3.2/var/db/cli/gd.ini
    - /home/ubuntu/.phpbrew/php/php-8.3.2/var/db/cli/opcache.ini
    - /home/ubuntu/.phpbrew/php/php-8.3.2/var/db/cli/swoole.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-sodium` to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require kreait/laravel-firebase:*" to figure out if any version is installable, or "composer require kreait/laravel-firebase:^2.1" if you know which you need.

Additional information

No response

jeromegamez commented 1 month ago

If you read the error, you will find

lcobucci/jwt[4.3.0, 5.1.0, ..., 5.3.0] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.