kreait / firebase-php

Unofficial Firebase Admin SDK for PHP
https://firebase-php.readthedocs.io/
MIT License
2.27k stars 431 forks source link

6.9.6 sendMulticast maybe too old #930

Closed xu5pu closed 1 month ago

xu5pu commented 1 month ago

Describe the bug

php 8.0 laravel 9 kreait/firebase-php 6.9.6

$report = $messaging->sendMulticast($message,$fcmToken); Operation is not implemented, or supported, or enabled.

Installed packages

apility/laravel-fcm                v1.4.4              Laravel / Lumen package for Firebase Cloud Messaging 
arrilot/laravel-widgets            3.13.1              A powerful alternative to view composers. Asynchronous widgets, reloadable widgets, con...
asm89/stack-cors                   v2.1.1              Cross-origin resource sharing library and stack middleware
bensampo/laravel-enum              v4.2.0              Simple, extensible and powerful enumeration implementation for Laravel.
beste/clock                        2.3.1               A collection of Clock implementations
beste/json                         1.0.0               A simple JSON helper to decode and encode JSON
brick/math                         0.9.3               Arbitrary-precision arithmetic library
dflydev/dot-access-data            v3.0.1              Given a deep data structure, access data by dot notation.
doctrine/cache                     2.2.0               PHP Doctrine Cache library is a popular cache implementation that supports many differe...
doctrine/dbal                      3.3.7               Powerful PHP database abstraction layer (DBAL) with many features for database schema i...
doctrine/deprecations              v1.0.0              A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options ...
doctrine/event-manager             1.1.1               The Doctrine Event Manager is a simple PHP event system that was built to be used with ...
doctrine/inflector                 2.0.4               PHP Doctrine Inflector is a small library that can perform string manipulations with re...
doctrine/instantiator              1.4.1               A small, lightweight utility to instantiate objects in PHP without invoking their const...
doctrine/lexer                     1.2.3               PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
dragonmantank/cron-expression      v3.3.1              CRON for PHP: Calculate the next or previous run date and determine if a CRON expressio...
egulias/email-validator            2.1.25              A library for validating emails against several RFCs
ezyang/htmlpurifier                v4.14.0             Standards compliant HTML filter written in PHP
facade/flare-client-php            1.9.1               Send PHP errors to Flare
facade/ignition                    2.17.6              A beautiful error page for Laravel applications.
facade/ignition-contracts          1.0.2               Solution contracts for Ignition
fakerphp/faker                     v1.19.0             Faker is a PHP library that generates fake data for you.
fig/http-message-util              1.1.5               Utility classes and constants for use with PSR-7 (psr/http-message)
filp/whoops                        2.14.5              php error handling for cool kids
firebase/php-jwt                   v6.10.0             A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to t...
fruitcake/laravel-cors             v2.2.0              Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
garygreen/pretty-routes            1.0.11              Pretty routes for Laravel 5+
google/auth                        v1.26.0             Google Auth Library for PHP
google/cloud-core                  v1.52.10            Google Cloud PHP shared dependency, providing functionality useful to all components.
google/cloud-storage               v1.36.1             Cloud Storage Client for PHP
graham-campbell/result-type        v1.0.4              An Implementation Of The Result Type
guzzlehttp/guzzle                  7.4.5               Guzzle is a PHP HTTP client library
guzzlehttp/promises                1.5.1               Guzzle promises library
guzzlehttp/psr7                    2.4.0               PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php              v2.0.1              This is the PHP port of Hamcrest Matchers
hanneskod/classtools               1.2.1               Find, extract and process classes from file system
intervention/image                 2.7.2               Image handling and manipulation library with support for Laravel integration
kreait/firebase-php                6.9.6               Firebase Admin SDK
kreait/firebase-tokens             3.0.3               A library to work with Firebase tokens
laminas/laminas-code               4.5.2               Extensions to the PHP Reflection API, static code scanning, and code generation
laminas/laminas-diactoros          2.11.2              PSR HTTP Message implementations
laravel/framework                  v8.83.18            The Laravel Framework.
laravel/octane                     v1.2.14             Supercharge your Laravel application's performance.
laravel/sanctum                    v2.15.1             Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.
laravel/serializable-closure       v1.2.0              Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.
laravel/tinker                     v2.7.2              Powerful REPL for the Laravel framework.
lcobucci/clock                     2.2.0               Yet another clock abstraction
lcobucci/jwt                       4.3.0               A simple library to work with JSON Web Token and JSON Web Signature
league/commonmark                  2.3.3               Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitH...
league/config                      v1.1.1              Define configuration arrays with strict schemas and access values with dot notation
league/flysystem                   1.1.9               Filesystem abstraction: Many filesystems, one API.
league/fractal                     0.19.2              Handle the output of complex data structures ready for API output.
league/glide                       1.7.1               Wonderfully easy on-demand image manipulation library with an HTTP based API.
league/mime-type-detection         1.11.0              Mime-type detection for Flysystem
maatwebsite/excel                  3.1.40              Supercharged Excel exports and imports in Laravel
maennchen/zipstream-php            2.2.1               ZipStream is a library for dynamically streaming dynamic zip files from PHP without wri...
markbaker/complex                  3.0.1               PHP Class for working with complex numbers
markbaker/matrix                   3.0.0               PHP Class for working with matrices
mnabialek/laravel-sql-logger       v2.2.9              Log SQL queries in Laravel/Lumen framework
mnabialek/laravel-version          v1.0.5              Get Laravel/Lumen version
mockery/mockery                    1.5.0               Mockery is a simple yet flexible PHP mock object framework
monolog/monolog                    2.7.0               Sends your logs to files, sockets, inboxes, databases and various web services
mtdowling/jmespath.php             2.7.0               Declaratively specify how to extract elements from a JSON document
myclabs/deep-copy                  1.11.0              Create deep copies (clones) of your objects
myclabs/php-enum                   1.8.3               PHP Enum implementation
namshi/jose                        7.2.3               JSON Object Signing and Encryption library for PHP.
nesbot/carbon                      2.59.1              An API extension for DateTime that supports 281 different languages.
nette/schema                       v1.2.2              📐 Nette Schema: validating data structures against a given Schema.
nette/utils                        v3.2.7              🛠  Nette Utils: lightweight utilities for string & array manipulation, image handlin...
nikic/php-parser                   v4.14.0             A PHP parser written in PHP
nunomaduro/collision               v5.11.0             Cli error handling for console/command-line PHP applications.
opis/closure                       3.6.3               A library that can be used to serialize closures (anonymous functions) and arbitrary ob...
phar-io/manifest                   2.0.3               Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version                    3.2.1               Library for handling version information and constraints
phpdocumentor/reflection-common    2.2.0               Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock  5.3.0               With this component, a library can provide support for annotations via DocBlocks or oth...
phpdocumentor/type-resolver        1.6.1               A PSR-5 based resolver of Class names, Types and Structural Element Names
phpoffice/phpspreadsheet           1.23.0              PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
phpoption/phpoption                1.8.1               Option Type for PHP
phpspec/prophecy                   v1.15.0             Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage          9.2.15              Library that provides collection, processing, and rendering functionality for PHP code ...
phpunit/php-file-iterator          3.0.6               FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker                3.1.1               Invoke callables with a timeout
phpunit/php-text-template          2.0.4               Simple template engine.
phpunit/php-timer                  5.0.3               Utility class for timing
phpunit/phpunit                    9.5.21              The PHP Unit Testing framework.
predis/predis                      v1.1.10             Flexible and feature-complete Redis client for PHP and HHVM
psr/cache                          3.0.0               Common interface for caching libraries
psr/clock                          1.0.0               Common interface for reading the clock.
psr/container                      1.1.2               Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher               1.0.0               Standard interfaces for event handling.
psr/http-client                    1.0.1               Common interface for HTTP clients
psr/http-factory                   1.0.1               Common interfaces for PSR-7 HTTP message factories
psr/http-message                   1.0.1               Common interface for HTTP messages
psr/log                            2.0.0               Common interface for logging libraries
psr/simple-cache                   1.0.1               Common interfaces for simple caching
psy/psysh                          v0.11.5             An interactive shell for modern PHP.
ralouphie/getallheaders            3.0.3               A polyfill for getallheaders.
ramsey/collection                  1.2.2               A PHP library for representing and manipulating collections.
ramsey/uuid                        4.3.1               A PHP library for generating and working with universally unique identifiers (UUIDs).
rap2hpoutre/laravel-log-viewer     v1.7.0              A Laravel log reader
riverline/multipart-parser         2.1.2               One class library to parse multipart content with encoding and charset support.
rize/uri-template                  0.3.6               PHP URI Template (RFC 6570) supports both expansion & extraction
sebastian/cli-parser               1.0.1               Library for parsing CLI options
sebastian/code-unit                1.0.8               Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3               Looks up which function or method a line of code belongs to
sebastian/comparator               4.0.6               Provides the functionality to compare PHP values for equality
sebastian/complexity               2.0.2               Library for calculating the complexity of PHP code units
sebastian/diff                     4.0.4               Diff implementation
sebastian/environment              5.1.4               Provides functionality to handle HHVM/PHP environments
sebastian/exporter                 4.0.4               Provides the functionality to export PHP variables for visualization
sebastian/global-state             5.0.5               Snapshotting of global state
sebastian/lines-of-code            1.0.3               Library for counting the lines of code in PHP source code
sebastian/object-enumerator        4.0.4               Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector         2.0.4               Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context        4.0.4               Provides functionality to recursively process PHP variables
sebastian/resource-operations      3.0.3               Provides a list of PHP built-in functions that operate on resources
sebastian/type                     3.0.0               Collection of value objects that represent the types of the PHP type system
sebastian/version                  3.0.2               Library that helps with managing the version number of Git-hosted PHP projects
spatie/image                       1.10.6              Manipulate images with an expressive API
spatie/image-optimizer             1.6.2               Easily optimize images using PHP
spatie/laravel-activitylog         4.5.3               A very simple activity logger to monitor the users of your website or application
spatie/laravel-medialibrary        9.12.3              Associate files with Eloquent models
spatie/laravel-package-tools       1.12.1              Tools for creating Laravel packages
spatie/laravel-permission          5.5.5               Permission handling for Laravel 6.0 and up
spatie/temporary-directory         2.1.0               Easily create, use and destroy temporary directories
stella-maris/clock                 0.1.7               A pre-release of the proposed PSR-20 Clock-Interface
swiftmailer/swiftmailer            v6.3.0              Swiftmailer, free feature-rich PHP mailer
symfony/console                    v5.4.10             Eases the creation of beautiful and testable command line interfaces
symfony/css-selector               v6.0.3              Converts CSS selectors to XPath expressions
symfony/deprecation-contracts      v3.0.2              A generic function and convention to trigger deprecation notices
symfony/error-handler              v5.4.9              Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher           v6.0.9              Provides tools that allow your application components to communicate with each other by...
symfony/event-dispatcher-contracts v3.0.2              Generic abstractions related to dispatching event
symfony/finder                     v5.4.8              Finds files and directories via an intuitive fluent interface
symfony/http-foundation            v5.4.10             Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                v5.4.10             Provides a structured process for converting a Request into a Response
symfony/mime                       v5.4.10             Allows manipulating MIME messages
symfony/polyfill-ctype             v1.26.0             Symfony polyfill for ctype functions
symfony/polyfill-iconv             v1.26.0             Symfony polyfill for the Iconv extension
symfony/polyfill-intl-grapheme     v1.26.0             Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn          v1.26.0             Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer   v1.26.0             Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring          v1.26.0             Symfony polyfill for the Mbstring extension
symfony/polyfill-php56             v1.20.0             Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php72             v1.26.0             Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73             v1.26.0             Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80             v1.26.0             Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/polyfill-php81             v1.26.0             Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions
symfony/process                    v5.4.8              Executes commands in sub-processes
symfony/psr-http-message-bridge    v2.1.2              PSR HTTP message bridge
symfony/routing                    v5.4.8              Maps an HTTP request to a set of configuration variables
symfony/service-contracts          v2.5.2              Generic abstractions related to writing services
symfony/string                     v6.0.10             Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and ...
symfony/translation                v6.0.9              Provides tools to internationalize your application
symfony/translation-contracts      v3.0.2              Generic abstractions related to translation
symfony/var-dumper                 v5.4.9              Provides mechanisms for walking through any arbitrary PHP variable
theseer/tokenizer                  1.2.1               A small library for converting tokenized PHP source code into XML and potentially other...
tijsverkoyen/css-to-inline-styles  2.2.4               CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pag...
tymon/jwt-auth                     dev-develop 014be8d JSON Web Token Authentication for Laravel and Lumen
vlucas/phpdotenv                   v5.4.1              Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagic...
voku/portable-ascii                1.6.1               Portable ASCII library - performance optimized (ascii) string functions for php.
webmozart/assert                   1.11.0              Assertions to validate method input/output with nice error messages.
yajra/laravel-datatables-fractal   v1.6.0              Laravel DataTables Fractal Plugin.
yajra/laravel-datatables-oracle    v9.21.1             jQuery DataTables API for Laravel 5|6|7|8|9

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-ctype               8.0.13    The ctype PHP extension
ext-curl                8.0.13    The curl PHP extension
ext-date                8.0.13    The date PHP extension
ext-dom                 20031129  The dom PHP extension
ext-exif                8.0.13    The exif PHP extension
ext-fileinfo            8.0.13    The fileinfo PHP extension
ext-filter              8.0.13    The filter PHP extension
ext-ftp                 8.0.13    The ftp PHP extension
ext-gd                  8.0.13    The gd PHP extension
ext-hash                8.0.13    The hash PHP extension
ext-iconv               8.0.13    The iconv PHP extension
ext-imagick             3.5.1     The imagick PHP extension
ext-json                8.0.13    The json PHP extension
ext-libxml              8.0.13    The libxml PHP extension
ext-mbstring            8.0.13    The mbstring PHP extension
ext-mcrypt              1.0.4     The mcrypt PHP extension
ext-mysqli              8.0.13    The mysqli PHP extension
ext-mysqlnd             0         The mysqlnd PHP extension (actual version: mysqlnd 8.0.13)
ext-openssl             8.0.13    The openssl PHP extension
ext-pcntl               8.0.13    The pcntl PHP extension
ext-pcre                8.0.13    The pcre PHP extension
ext-pdo                 8.0.13    The PDO PHP extension
ext-pdo_mysql           8.0.13    The pdo_mysql PHP extension
ext-pdo_sqlite          8.0.13    The pdo_sqlite PHP extension
ext-phar                8.0.13    The Phar PHP extension
ext-posix               8.0.13    The posix PHP extension
ext-readline            8.0.13    The readline PHP extension
ext-redis               5.3.7     The redis PHP extension
ext-reflection          8.0.13    The Reflection PHP extension
ext-session             8.0.13    The session PHP extension
ext-simplexml           8.0.13    The SimpleXML PHP extension
ext-sodium              8.0.13    The sodium PHP extension
ext-spl                 8.0.13    The SPL PHP extension
ext-sqlite3             8.0.13    The sqlite3 PHP extension
ext-swoole              5.0.2     The swoole PHP extension
ext-tokenizer           8.0.13    The tokenizer PHP extension
ext-xml                 8.0.13    The xml PHP extension
ext-xmlreader           8.0.13    The xmlreader PHP extension
ext-xmlwriter           8.0.13    The xmlwriter PHP extension
ext-zend-opcache        8.0.13    The Zend OPcache PHP extension
ext-zip                 1.19.5    The zip PHP extension
ext-zlib                8.0.13    The zlib PHP extension
lib-curl                7.79.1    The curl library
lib-curl-openssl        1.1.1.19  curl OpenSSL version (1.1.1.19)
lib-curl-zlib           1.2.12    curl zlib version
lib-date-timelib        2020.03   date timelib version
lib-date-zoneinfo       2021.3    zoneinfo ("Olson") database for date
lib-fileinfo-libmagic   539       fileinfo libmagic version
lib-gd                  2.0.35    The gd library
lib-gd-freetype         2.10.4    freetype version for gd
lib-gd-libjpeg          8.0       libjpeg version for gd
lib-gd-libpng           1.6.37    libpng version for gd
lib-imagick-imagemagick 7.0.11.14 The imagick-imagemagick library
lib-libsodium           1.0.18    The libsodium library
lib-libxml              2.9.12    libxml library version
lib-mbstring-libmbfl    1.3.2     mbstring libmbfl version
lib-mbstring-oniguruma  6.9.6     mbstring oniguruma version
lib-openssl             1.1.1.12  OpenSSL 1.1.1l  24 Aug 2021
lib-pcre                10.35     The pcre library
lib-pcre-unicode        13.0.0    PCRE Unicode version support
lib-pdo_sqlite-sqlite   3.34.1    The pdo_sqlite-sqlite library
lib-sqlite3-sqlite      3.34.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.0.13    The PHP interpreter
php-64bit               8.0.13    The PHP interpreter, 64bit
php-ipv6                8.0.13    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.
// 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

https://groups.google.com/g/firebase-talk/c/1OHTEwSzZYU

Additional information

No response

jeromegamez commented 1 month ago

Please update to the latest 7.x release, this should fix the issue.

milospetkovic commented 1 month ago

Latest 2 weeks my app didn't receive notifications. The package was 6.9.6 version, and after update to the latest 7.15.0 it works again! Thanks. Although I'm not sure why it stop because it worked for over a year. I guess it's something with the Firebase API?!

jeromegamez commented 1 month ago

Yes, Firebase has introduced the so-called "HTTP V1 API" and deprecated and then shut down the now-legacy API.

This SDK supported the new API for sending single messages right away, but I held off of batch requests because it would it would mean rewriting the part, and at the time, I was so frustrated with the lack of support (= Sponsorships) that I didn't want to commit the time.

When Firebase announced that it would shut down the legacy API I did it anyway because my fellow devs shouldn't suffer for their employers not caring about funding the Open Source projects they used. But because I had already released a new major version, I only implemented in a version 7 release, and kept the option to backport the change to 6.x for paid support.

But I'm glad you did the upgrade and that it worked well for you! Every upgrade to a new version is a win in my book 🤗

milospetkovic commented 1 month ago

Thanks a lot for keep contributing and developing further. I'll have a look at the repo and Firebase changes to see changes and examine things. Have a good day.