kreait / laravel-firebase

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

About compatibility with PHP 8 #182

Closed IngAjVillalon closed 1 year ago

IngAjVillalon commented 1 year ago

Describe the bug

Hey guys, First of all, I want to congratulate you on your excellent work, it helps a lot of people.

I would like to see if you could guide me on a problem I am facing when trying to use your package.

I think your sister package kreait/firebase-php is not compatible with PHP 8, as I get this error when trying to install your package:

- kreait/firebase-php[4.30.0, ..., 4.x-dev] require php ^7.0 -> your php version (8.2.5) does not satisfy that requirement.

For that reason, I think it's a compatibility issue with PHP 8.

Or do you think I'm doing something wrong?

I leave you the complete response to the execution of the command:

`sail composer require kreait/laravel-firebase Info from https://repo.packagist.org: #StandWithUkraine ./composer.json has been updated Running composer update kreait/laravel-firebase Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1

Installed packages

"require": {
        "php": ">=8",
        "guzzlehttp/guzzle": "^7.2",
        "harrygulliford/laravel-firebird": "^3.1",
        "laravel/framework": "^9.2",
        "laravel/sanctum": "^2.14.1",
        "laravel/tinker": "^2.7",
        "plesk/ext-laravel-integration": "^7.0",
        "sebdesign/laravel-state-machine": "^3.3",
        "spatie/laravel-data": "^3.5",
        "spatie/laravel-query-builder": "^5.1"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1",
        "phpunit/phpunit": "^9.5.10",
        "spatie/laravel-ignition": "^1.0"
    },

PHP version and extensions

composer                2.5.5     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.5     The bcmath PHP extension
ext-calendar            8.2.5     The calendar PHP extension
ext-ctype               8.2.5     The ctype PHP extension
ext-curl                8.2.5     The curl PHP extension
ext-date                8.2.5     The date PHP extension
ext-dom                 20031129  The dom PHP extension
ext-exif                8.2.5     The exif PHP extension
ext-ffi                 8.2.5     The FFI PHP extension
ext-fileinfo            8.2.5     The fileinfo PHP extension
ext-filter              8.2.5     The filter PHP extension
ext-ftp                 8.2.5     The ftp PHP extension
ext-gd                  8.2.5     The gd PHP extension
ext-gettext             8.2.5     The gettext PHP extension
ext-hash                8.2.5     The hash PHP extension
ext-iconv               8.2.5     The iconv PHP extension
ext-igbinary            3.2.13    The igbinary PHP extension
ext-imagick             3.7.0     The imagick PHP extension
ext-imap                8.2.5     The imap PHP extension
ext-intl                8.2.5     The intl PHP extension
ext-json                8.2.5     The json PHP extension
ext-ldap                8.2.5     The ldap PHP extension
ext-libxml              8.2.5     The libxml PHP extension
ext-mbstring            8.2.5     The mbstring PHP extension
ext-memcached           3.2.0     The memcached PHP extension
ext-msgpack             2.2.0RC2  The msgpack PHP extension
ext-mysqli              8.2.5     The mysqli PHP extension
ext-mysqlnd             0         The mysqlnd PHP extension (actual version: mysqlnd 8.2.5)
ext-openssl             8.2.5     The openssl PHP extension
ext-pcntl               8.2.5     The pcntl PHP extension
ext-pcov                1.0.11    The pcov PHP extension
ext-pcre                8.2.5     The pcre PHP extension
ext-pdo                 8.2.5     The PDO PHP extension
ext-pdo_mysql           8.2.5     The pdo_mysql PHP extension
ext-pdo_pgsql           8.2.5     The pdo_pgsql PHP extension
ext-pdo_sqlite          8.2.5     The pdo_sqlite PHP extension
ext-pgsql               8.2.5     The pgsql PHP extension
ext-phar                8.2.5     The Phar PHP extension
ext-posix               8.2.5     The posix PHP extension
ext-random              8.2.5     The random PHP extension
ext-readline            8.2.5     The readline PHP extension
ext-redis               5.3.7     The redis PHP extension
ext-reflection          8.2.5     The Reflection PHP extension
ext-session             8.2.5     The session PHP extension
ext-shmop               8.2.5     The shmop PHP extension
ext-simplexml           8.2.5     The SimpleXML PHP extension
ext-soap                8.2.5     The soap PHP extension
ext-sockets             8.2.5     The sockets PHP extension
ext-sodium              8.2.5     The sodium PHP extension
ext-spl                 8.2.5     The SPL PHP extension
ext-sqlite3             8.2.5     The sqlite3 PHP extension
ext-swoole              5.0.1     The swoole PHP extension
ext-sysvmsg             8.2.5     The sysvmsg PHP extension
ext-sysvsem             8.2.5     The sysvsem PHP extension
ext-sysvshm             8.2.5     The sysvshm PHP extension
ext-tokenizer           8.2.5     The tokenizer PHP extension
ext-xdebug              3.2.0     The xdebug PHP extension
ext-xml                 8.2.5     The xml PHP extension
ext-xmlreader           8.2.5     The xmlreader PHP extension
ext-xmlwriter           8.2.5     The xmlwriter PHP extension
ext-xsl                 8.2.5     The xsl PHP extension
ext-zend-opcache        8.2.5     The Zend OPcache PHP extension
ext-zip                 1.21.1    The zip PHP extension
ext-zlib                8.2.5     The zlib PHP extension
lib-curl                7.81.0    The curl library
lib-curl-libssh         0.9.6     curl libssh version
lib-curl-openssl        3.0.2     curl OpenSSL version (3.0.2)
lib-curl-zlib           1.2.11    curl zlib version
lib-date-timelib        2022.05   date timelib version
lib-date-zoneinfo       0         zoneinfo ("Olson") database for date
lib-fileinfo-libmagic   540       fileinfo libmagic version
lib-gd                  2.3.3     The gd library
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-imagick-imagemagick 6.9.11.60 The imagick-imagemagick library
lib-ldap-openldap       2.5.14    OpenLDAP version of ldap
lib-libsodium           1.0.18    The libsodium library
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.40     The pcre library
lib-pcre-unicode        14.0.0    PCRE Unicode version support
lib-pdo_pgsql-libpq     15.2      libpq for pdo_pgsql
lib-pdo_sqlite-sqlite   3.37.2    The pdo_sqlite-sqlite library
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.2.5     The PHP interpreter
php-64bit               8.2.5     The PHP interpreter, 64bit
php-ipv6                8.2.5     The PHP interpreter, with IPv6 support

Steps to reproduce the issue.

# Insert the commands issued in the terminal if they are needed
# to reproduce the issue. Otherwise, delete this code block.

sail composer require kreait/laravel-firebase

// Insert the PHP code to reproduce the issue. Please ensure that it is code that
// can be copy pasted to reproduce it.

Error message/Stack trace

sail composer require kreait/laravel-firebase
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update kreait/laravel-firebase
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - kreait/laravel-firebase 1.0.0 requires kreait/firebase-php ^4.30 -> satisfiable by kreait/firebase-php[4.30.0, ..., 4.x-dev].
    - kreait/laravel-firebase 4.2.0 requires kreait/firebase-php ^6.7 -> satisfiable by kreait/firebase-php[6.7.0, ..., 6.x-dev].
    - kreait/laravel-firebase 4.1.0 requires kreait/firebase-php ^6.0 -> satisfiable by kreait/firebase-php[6.0.0, ..., 6.x-dev].
    - kreait/laravel-firebase[dev-dependabot/github_actions/dependabot/fetch-metadata-1.5.0, dev-dependabot/github_actions/dependabot/fetch-metadata-1.5.1, dev-main, 5.0.0, ..., 5.2.0] require kreait/firebase-php ^7.0 -> satisfiable by kreait/firebase-php[7.0.0, ..., 7.x-dev].
    - kreait/firebase-php 7.x-dev requires google/cloud-core ^1.48.1 -> satisfiable by google/cloud-core[v1.48.1, ..., v1.51.2].
    - kreait/firebase-php[4.30.0, ..., 4.x-dev] require php ^7.0 -> your php version (8.2.5) 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, ..., 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.0.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.
    - kreait/laravel-firebase[2.2.0, ..., 2.3.1] require php ^7.2 -> your php version (8.2.5) 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, ..., 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.
    - kreait/laravel-firebase[3.0.0, ..., 3.4.0] require illuminate/contracts ^6.0|^7.0|^8.0 -> found illuminate/contracts[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.
    - kreait/laravel-firebase[3.1.0, ..., 3.2.0] require php ^7.2|~8.0.0 -> your php version (8.2.5) does not satisfy that requirement.
    - kreait/laravel-firebase 4.0.0 requires illuminate/contracts ^8.0 -> found illuminate/contracts[v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - kreait/firebase-php[6.0.0, ..., 6.x-dev, 7.0.0, ..., 7.2.1] require psr/http-message ^1.0.1 -> found psr/http-message[1.0.1, 1.1] but the package is fixed to 2.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.
    - google/cloud-core[v1.47.0, ..., v1.51.2] require guzzlehttp/promises ^1.3 -> found guzzlehttp/promises[1.3.0, ..., 1.5.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 * -> satisfiable by kreait/laravel-firebase[dev-dependabot/github_actions/dependabot/fetch-metadata-1.5.0, dev-dependabot/github_actions/dependabot/fetch-metadata-1.5.1, dev-main, 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.1.0, 5.2.0, 9999999-dev].

Additional information

No response

Sheruan commented 1 year ago

I have the same problem. Please, let me know if there is any solution. Many thanks

jeromegamez commented 1 year ago

If you find "but the package is fixed to" messages in the composer output, try the same command with the --with-all-dependencies option. This can help resolve conflicts by upgrading/downgrading packages in the dependency tree as needed.