kreait / laravel-firebase

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

Not able to update minor version of peer dependency kreait/firebase-php #154

Closed jesperbjerke closed 1 year ago

jesperbjerke commented 1 year ago

Describe the bug

So this is a weird thing. This might not be an issue of this package, and just something with my configuration. But I have this issue in 2 different projects, one with php 7.4 and Laravel 8 and one with php 8.1 and Laravel 9. Since the last two minor versions of the firebase-php package, composer won't update and we are stuck on 6.8.0. We do not have this package added as a root package, so it's only installed through laravel-firebase. I cannot find anything blocking this update. Trying composer why-not does not report any blocker either.

Any idea why this is? Have not had this issue before, and it seems to only be an issue with firebase-php.

Installed packages

"require": {
        "php": "^8.1",
        "ext-intl": "*",
        "ext-json": "*",
        "ext-openssl": "*",
        "bjerke/api-query-builder": "^1.1",
        "bjerke/laravel-bread": "^4.0",
        "bjerke/laravel-enums": "^2.0",
        "deployer/deployer": "^7.0",
        "doctrine/dbal": "^3.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "kreait/laravel-firebase": "^4.0",
        "laravel/cashier": "^14.0",
        "laravel/framework": "^9.0",
        "laravel/horizon": "^5.2",
        "laravel/tinker": "^2.0",
        "laravel/ui": "^4.0",
        "moneyphp/money": "^4.0",
        "pusher/pusher-php-server": "^7.0",
        "sentry/sentry-laravel": "^2.12",
        "silber/bouncer": "^v1.0.0",
        "spatie/laravel-health": "^1.14",
        "spatie/laravel-medialibrary": "^10.0",
        "symfony/intl": "^6.0",
        "ueberdosis/tiptap-php": "^1.1"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "^2.8",
        "spatie/laravel-ignition": "^1.0",
        "itsgoingd/clockwork": "^5.0",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^6.1",
        "nunomaduro/larastan": "^2.0",
        "phpunit/phpunit": "^9.3",
        "predis/predis": "^2.0",
        "roave/security-advisories": "dev-latest",
        "squizlabs/php_codesniffer": "^3.5",
        "orchestra/testbench": "^7"
    }

### PHP version and extensions

```shell
composer                   2.3.8     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.1.2     The bcmath PHP extension
ext-bz2                    8.1.2     The bz2 PHP extension
ext-calendar               8.1.2     The calendar PHP extension
ext-ctype                  8.1.2     The ctype PHP extension
ext-curl                   8.1.2     The curl PHP extension
ext-date                   8.1.2     The date PHP extension
ext-dba                    8.1.2     The dba PHP extension
ext-dom                    20031129  The dom PHP extension
ext-enchant                8.1.2     The enchant PHP extension
ext-exif                   8.1.2     The exif PHP extension
ext-ffi                    8.1.2     The FFI PHP extension
ext-fileinfo               8.1.2     The fileinfo PHP extension
ext-filter                 8.1.2     The filter PHP extension
ext-ftp                    8.1.2     The ftp PHP extension
ext-gd                     8.1.2     The gd PHP extension
ext-gettext                8.1.2     The gettext PHP extension
ext-gmp                    8.1.2     The gmp PHP extension
ext-hash                   8.1.2     The hash PHP extension
ext-iconv                  8.1.2     The iconv PHP extension
ext-igbinary               3.2.6     The igbinary PHP extension
ext-imagick                3.5.1     The imagick PHP extension
ext-imap                   8.1.2     The imap PHP extension
ext-intl                   8.1.2     The intl PHP extension
ext-json                   8.1.2     The json PHP extension
ext-ldap                   8.1.2     The ldap PHP extension
ext-libxml                 8.1.2     The libxml PHP extension
ext-mbstring               8.1.2     The mbstring PHP extension
ext-memcached              3.1.5     The memcached PHP extension
ext-msgpack                2.2.0RC1  The msgpack PHP extension
ext-mysqli                 8.1.2     The mysqli PHP extension
ext-mysqlnd                0         The mysqlnd PHP extension (actual version: mysqlnd 8.1.2)
ext-odbc                   8.1.2     The odbc PHP extension
ext-openssl                8.1.2     The openssl PHP extension
ext-pcntl                  8.1.2     The pcntl PHP extension
ext-pcre                   8.1.2     The pcre PHP extension
ext-pdo                    8.1.2     The PDO PHP extension
ext-pdo_dblib              8.1.2     The pdo_dblib PHP extension
ext-pdo_firebird           8.1.2     The PDO_Firebird PHP extension
ext-pdo_mysql              8.1.2     The pdo_mysql PHP extension
ext-pdo_odbc               8.1.2     The PDO_ODBC PHP extension
ext-pdo_pgsql              8.1.2     The pdo_pgsql PHP extension
ext-pdo_sqlite             8.1.2     The pdo_sqlite PHP extension
ext-pgsql                  8.1.2     The pgsql PHP extension
ext-phar                   8.1.2     The Phar PHP extension
ext-posix                  8.1.2     The posix PHP extension
ext-pspell                 8.1.2     The pspell PHP extension
ext-readline               8.1.2     The readline PHP extension
ext-redis                  5.3.4     The redis PHP extension
ext-reflection             8.1.2     The Reflection PHP extension
ext-session                8.1.2     The session PHP extension
ext-shmop                  8.1.2     The shmop PHP extension
ext-simplexml              8.1.2     The SimpleXML PHP extension
ext-snmp                   8.1.2     The snmp PHP extension
ext-soap                   8.1.2     The soap PHP extension
ext-sockets                8.1.2     The sockets PHP extension
ext-sodium                 8.1.2     The sodium PHP extension
ext-spl                    8.1.2     The SPL PHP extension
ext-sqlite3                8.1.2     The sqlite3 PHP extension
ext-sysvmsg                8.1.2     The sysvmsg PHP extension
ext-sysvsem                8.1.2     The sysvsem PHP extension
ext-sysvshm                8.1.2     The sysvshm PHP extension
ext-tidy                   8.1.2     The tidy PHP extension
ext-tokenizer              8.1.2     The tokenizer PHP extension
ext-xml                    8.1.2     The xml PHP extension
ext-xmlreader              8.1.2     The xmlreader PHP extension
ext-xmlrpc                 1.0.0RC2  The xmlrpc PHP extension
ext-xmlwriter              8.1.2     The xmlwriter PHP extension
ext-xsl                    8.1.2     The xsl PHP extension
ext-zend-opcache           8.1.2     The Zend OPcache PHP extension
ext-zip                    1.19.5    The zip PHP extension
ext-zlib                   8.1.2     The zlib PHP extension
lib-bz2                    1.0.8     The bz2 library
lib-curl                   7.68.0    The curl library
lib-curl-libssh            0.9.3     curl libssh version
lib-curl-openssl           1.1.1.6   curl OpenSSL version (1.1.1.6)
lib-curl-zlib              1.2.11    curl zlib version
lib-date-timelib           2021.11   date timelib version
lib-date-zoneinfo          0         zoneinfo ("Olson") database for date
lib-fileinfo-libmagic      540       fileinfo libmagic version
lib-gd                     2.3.0     The gd library
lib-gmp                    6.2.0     The gmp library
lib-iconv                  2.31      The iconv library
lib-icu                    66.1      The ICU unicode and globalization support library
lib-icu-cldr               36.1      ICU CLDR project version
lib-icu-unicode            13.0.0    ICU unicode version
lib-imagick-imagemagick    6.9.10.23 The imagick-imagemagick library
lib-ldap-openldap          2.4.49    OpenLDAP version of ldap
lib-libsodium              1.0.18    The libsodium library
lib-libxml                 2.9.12    libxml library version
lib-libxslt                1.1.34    The libxslt library
lib-libxslt-libxml         2.9.10    libxml version libxslt is compiled against
lib-mbstring-libmbfl       1.3.2     mbstring libmbfl version
lib-mbstring-oniguruma     6.9.4     mbstring oniguruma version
lib-memcached-libmemcached 1.0.18    libmemcached version
lib-openssl                1.1.1.6   OpenSSL 1.1.1f  31 Mar 2020
lib-pcre                   10.39     The pcre library
lib-pcre-unicode           14.0.0    PCRE Unicode version support
lib-pdo_pgsql-libpq        14.1      libpq for pdo_pgsql
lib-pdo_sqlite-sqlite      3.31.1    The pdo_sqlite-sqlite library
lib-sqlite3-sqlite         3.31.1    The sqlite3-sqlite library
lib-zip-libzip             1.7.3     The zip-libzip library
lib-zlib                   1.2.11    The zlib library
php                        8.1.2     The PHP interpreter
php-64bit                  8.1.2     The PHP interpreter, 64bit
php-ipv6                   8.1.2     The PHP interpreter, with IPv6 support

Steps to reproduce the issue.

Just run composer update and then composer outdated still says we're on version 6.8.0 of firebase-php and that 6.9.1 is available.

Error message/Stack trace

No error messages

Additional information

No response

jeromegamez commented 1 year ago

Just to be sure, have you tried a composer update --with-all-dependencies?

jesperbjerke commented 1 year ago

Yes, no difference unfortunately.

$ composer update --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
$ composer outdated
kreait/firebase-php        6.8.0   6.9.1  Firebase Admin SDK
jeromegamez commented 1 year ago

That's really weird - I was able to reproduce the issue in a fresh directory with the contents of your composer.json - only the 6.8 release was installed.

I then did a composer show | grep kreait and a composer why kreait/firebase-php and saw no reason why it shouldn't install the latest version:

❯ composer show | grep kreait
kreait/firebase-php                6.8.0              Firebase Admin SDK
kreait/firebase-tokens             3.0.3              A library to work w...
kreait/laravel-firebase            4.2.0              A Laravel package f...

❯ composer why kreait/firebase-php
kreait/laravel-firebase   4.2.0       requires  kreait/firebase-php (^6.7)

What's even weirder - once I did a composer require -W "kreait/firebase-php:^6.9.1", it installed the latest version of the SDK. But why, I don't know.

Anyway, this resolved the issue for me, let me know if it does for you as well.

But don't try to remove the explicit dependency from your composer.json afterwards again, this will install the older release again. Super weird!

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let me know if that works for you by leaving a 👍. Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

jesperbjerke commented 1 year ago

Sorry, forgot to update the issue. Yes, installing the peer dependency manually forced the newer version to get installed. Havent had time to investigate the root cause yet, but so far it seems to be an okay work-around.