kreait / firebase-php

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

Does this project support for Firebase remote config with personalisation parameter? #731

Closed asyrafkindil-yuno closed 1 year ago

asyrafkindil-yuno commented 1 year ago

Describe the issue you are experiencing

When I try to get remote config template, exception with (Undefined array key "value") occur.

Previously without the personalization parameter, get remote config works, after adding new personalization parameter in the remote config the exception occur.

Installed packages

asm89/stack-cors v2.1.1 Cross-origin resource sharing library and stack middleware bacon/bacon-qr-code 2.0.7 BaconQrCode is a QR code generator for PHP. beste/clock 2.1.0 A collection of Clock implementations beste/json 1.0.0 A simple JSON helper to decode and encode JSON brick/math 0.10.2 Arbitrary-precision arithmetic library dasprid/enum 1.0.3 PHP 7.1 enum implementation 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 different drivers such as redis, memcache, apc, mongodb and ot...
doctrine/dbal 3.4.3 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management. doctrine/deprecations v1.0.0 A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.
doctrine/event-manager 1.1.2 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects. doctrine/inflector 2.0.4 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of wo...
doctrine/instantiator 1.4.1 A small, lightweight utility to instantiate objects in PHP without invoking their constructors 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 expression is due egulias/email-validator 3.2.1 A library for validating emails against several RFCs ezyang/htmlpurifier v4.14.0 Standards compliant HTML filter written in PHP fakerphp/faker v1.20.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.3.0 A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec. fruitcake/laravel-cors v2.2.0 Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application fruitcake/php-cors v1.2.0 Cross-origin resource sharing library for the Symfony HttpFoundation google/auth v1.22.0 Google Auth Library for PHP google/cloud-core v1.47.2 Google Cloud PHP shared dependency, providing functionality useful to all components. google/cloud-storage v1.28.1 Cloud Storage Client for PHP google/crc32 v0.1.0 Various CRC32 implementations graham-campbell/result-type v1.1.0 An Implementation Of The Result Type guzzlehttp/guzzle 7.5.0 Guzzle is a PHP HTTP client library guzzlehttp/promises 1.5.2 Guzzle promises library guzzlehttp/psr7 2.4.1 PSR-7 message implementation that also provides common utility methods hamcrest/hamcrest-php v2.0.1 This is the PHP port of Hamcrest Matchers inertiajs/inertia-laravel v0.6.3 The Laravel adapter for Inertia.js. intervention/image 2.7.2 Image handling and manipulation library with support for Laravel integration jaybizzle/crawler-detect v1.2.111 CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent jenssegers/agent v2.6.4 Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect kreait/firebase-php 6.8.0 Firebase Admin SDK kreait/firebase-tokens 3.0.3 A library to work with Firebase tokens laravel/fortify v1.13.3 Backend controllers and scaffolding for Laravel authentication. laravel/framework v9.27.0 The Laravel Framework. laravel/jetstream v2.11.2 Tailwind scaffolding for the Laravel framework. laravel/sail v1.15.4 Docker files for running a basic Laravel application. laravel/sanctum v2.15.1 Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs. laravel/serializable-closure v1.2.1 Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP. laravel/telescope v4.9.2 An elegant debug assistant for the Laravel framework. laravel/tinker v2.7.2 Powerful REPL for the Laravel framework. lcobucci/clock 2.2.0 Yet another clock abstraction lcobucci/jwt 4.2.1 A simple library to work with JSON Web Token and JSON Web Signature league/commonmark 2.3.5 Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM) league/config v1.1.1 Define configuration arrays with strict schemas and access values with dot notation league/flysystem 3.2.1 File storage abstraction for PHP league/glide 2.2.2 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 writing to the disk at all on the server. markbaker/complex 3.0.1 PHP Class for working with complex numbers markbaker/matrix 3.0.0 PHP Class for working with matrices mobiledetect/mobiledetectlib 2.8.39 Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to de...
mockery/mockery 1.5.0 Mockery is a simple yet flexible PHP mock object framework monolog/monolog 2.8.0 Sends your logs to files, sockets, inboxes, databases and various web services mtdowling/jmespath.php 2.6.1 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.4 PHP Enum implementation nesbot/carbon 2.62.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 handling, safe JSON e ncoding/decoding, validation, slug or str...
nicmart/tree 0.3.1 A basic but flexible php tree data structure and a fluent tree builder implementation. nikic/php-parser v4.15.1 A PHP parser written in PHP nunomaduro/collision v6.3.0 Cli error handling for console/command-line PHP applications. nunomaduro/termwind v1.14.0 Its like Tailwind CSS, but for the console. paragonie/constant_timeencoding v2.6.3 Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16) 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 phpoffice/phpspreadsheet 1.24.1 PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine phpoption/phpoption 1.9.0 Option Type for PHP phpunit/php-code-coverage 9.2.17 Library that provides collection, processing, and rendering functionality for PHP code coverage information. 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.24 The PHP Unit Testing framework. pragmarx/google2fa v8.0.1 A One Time Password Authentication package, compatible with Google Authenticator. psr/cache 3.0.0 Common interface for caching libraries psr/container 2.0.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 3.0.0 Common interface for logging libraries psr/simple-cache 2.0.0 Common interfaces for simple caching psy/psysh v0.11.8 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.4.0 A PHP library for generating and working with universally unique identifiers (UUIDs). riverline/multipart-parser 2.0.9 One class library to parse multipart content with encoding and charset support. rize/uri-template 0.3.4 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.1.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/backtrace 1.2.1 A better backtrace spatie/browsershot 3.57.2 Convert a webpage to an image or pdf using headless Chrome spatie/crawler 7.1.2 Crawl all internal links found on a website spatie/flare-client-php 1.3.0 Send PHP errors to Flare spatie/ignition 1.4.1 A beautiful error page for PHP applications. spatie/image 2.2.4 Manipulate images with an expressive API spatie/image-optimizer 1.6.2 Easily optimize images using PHP spatie/laravel-ignition 1.4.1 A beautiful error page for Laravel applications. spatie/laravel-package-tools 1.12.1 Tools for creating Laravel packages spatie/laravel-sitemap 6.2.1 Create and generate sitemaps with ease spatie/robots-txt 2.0.2 Determine if a page may be crawled from robots.txt and robots meta tags spatie/temporary-directory 2.1.1 Easily create, use and destroy temporary directories stella-maris/clock 0.1.5 A pre-release of the proposed PSR-20 Clock-Interface symfony/console v6.0.12 Eases the creation of beautiful and testable command line interfaces symfony/css-selector v6.0.11 Converts CSS selectors to XPath expressions symfony/deprecation-contracts v3.0.2 A generic function and convention to trigger deprecation notices symfony/dom-crawler v6.0.12 Eases DOM navigation for HTML and XML documents symfony/error-handler v6.0.11 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 dispatching events and listening to them symfony/event-dispatcher-contracts v3.0.2 Generic abstractions related to dispatching event symfony/finder v6.0.11 Finds files and directories via an intuitive fluent interface symfony/http-foundation v6.0.12 Defines an object-oriented layer for the HTTP specification symfony/http-kernel v6.0.12 Provides a structured process for converting a Request into a Response symfony/mailer v6.0.12 Helps sending emails symfony/mime v6.0.12 Allows manipulating MIME messages symfony/polyfill-ctype v1.26.0 Symfony polyfill for ctype functions 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-php72 v1.26.0 Symfony polyfill backporting some PHP 7.2+ 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 v6.0.11 Executes commands in sub-processes symfony/routing v6.0.11 Maps an HTTP request to a set of configuration variables symfony/service-contracts v3.0.2 Generic abstractions related to writing services symfony/string v6.0.12 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way symfony/translation v6.0.12 Provides tools to internationalize your application symfony/translation-contracts v3.0.2 Generic abstractions related to translation symfony/var-dumper v6.0.11 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 formats tightenco/ziggy v1.4.6 Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript. tijsverkoyen/css-to-inline-styles 2.2.4 CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when y...
vlucas/phpdotenv v5.4.1 Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically. voku/portable-ascii 2.0.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.

PHP version and extensions

composer 2.3.10 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.0.14 The bcmath PHP extension ext-bz2 8.0.14 The bz2 PHP extension ext-calendar 8.0.14 The calendar PHP extension ext-ctype 8.0.14 The ctype PHP extension ext-curl 8.0.14 The curl PHP extension ext-date 8.0.14 The date PHP extension ext-dom 20031129 The dom PHP extension ext-exif 8.0.14 The exif PHP extension ext-fileinfo 8.0.14 The fileinfo PHP extension ext-filter 8.0.14 The filter PHP extension ext-ftp 8.0.14 The ftp PHP extension ext-gd 8.0.14 The gd PHP extension ext-gettext 8.0.14 The gettext PHP extension ext-hash 8.0.14 The hash PHP extension ext-iconv 8.0.14 The iconv PHP extension ext-json 8.0.14 The json PHP extension ext-libxml 8.0.14 The libxml PHP extension ext-mbstring 8.0.14 The mbstring PHP extension ext-mysqli 8.0.14 The mysqli PHP extension ext-mysqlnd 0 The mysqlnd PHP extension (actual version: mysqlnd 8.0.14) ext-openssl 8.0.14 The openssl PHP extension ext-pcre 8.0.14 The pcre PHP extension ext-pdo 8.0.14 The PDO PHP extension ext-pdo_mysql 8.0.14 The pdo_mysql PHP extension ext-pdo_sqlite 8.0.14 The pdo_sqlite PHP extension ext-phar 8.0.14 The Phar PHP extension ext-readline 8.0.14 The readline PHP extension ext-reflection 8.0.14 The Reflection PHP extension ext-session 8.0.14 The session PHP extension ext-simplexml 8.0.14 The SimpleXML PHP extension ext-sodium 8.0.14 The sodium PHP extension ext-spl 8.0.14 The SPL PHP extension ext-tokenizer 8.0.14 The tokenizer PHP extension ext-xml 8.0.14 The xml PHP extension ext-xmlreader 8.0.14 The xmlreader PHP extension ext-xmlwriter 8.0.14 The xmlwriter PHP extension ext-zip 1.19.5 The zip PHP extension ext-zlib 8.0.14 The zlib PHP extension lib-bz2 1.0.8 The bz2 library lib-curl 7.76.1 The curl library lib-curl-libssh2 1.9.0 curl libssh2 version lib-curl-openssl 1.1.1.12 curl OpenSSL version (1.1.1.12) lib-curl-zlib 1.2.11 curl zlib version lib-date-timelib 2020.03 date timelib version lib-date-zoneinfo 2021.5 zoneinfo ("Olson") database for date lib-fileinfo-libmagic 539 fileinfo libmagic version lib-gd 2.0.35 The gd library lib-gd-freetype 2.9.1 freetype version for gd lib-gd-libjpeg 9.0 libjpeg version for gd lib-gd-libpng 1.6.34 libpng version for gd lib-gd-libxpm 3.5.12 libxpm version for gd lib-iconv 1.16 The iconv library lib-libsodium 1.0.18 The libsodium library lib-libxml 2.9.10 libxml library version lib-mbstring-libmbfl 1.3.2 mbstring libmbfl version lib-mbstring-oniguruma 6.9.7 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.33.0 The pdo_sqlite-sqlite library lib-zip-libzip 1.7.1 The zip-libzip library lib-zlib 1.2.11 The zlib library php 8.0.14 The PHP interpreter php-64bit 8.0.14 The PHP interpreter, 64bit php-ipv6 8.0.14 The PHP interpreter, with IPv6 support php-zts 8.0.14 The PHP interpreter, with Zend Thread Safety

On which operating system(s) does the issue occur?

Steps to reproduce the issue.

use Kreait\Firebase\Factory;

$factory = (new Factory())->withServiceAccount('/path/to/service_account.json');
$remoteConfig = $firebase->createRemoteConfig();
$template = $remoteConfig->get();

// ...

Error message/Stack trace

[2022-09-06 05:03:58] local.ERROR: Undefined array key "value" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"value\" at D:\Yuno\calendar2u-landing\vendor\kreait\firebase-php\src\Firebase\RemoteConfig\Template.php:85) [stacktrace]

0 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(259): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Undefined array...', 'D:\\Yuno\\calenda...', 85)

1 D:\Yuno\calendar2u-landing\vendor\kreait\firebase-php\src\Firebase\RemoteConfig\Template.php(85): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'Undefined array...', 'D:\\Yuno\\calenda...', 85)

2 D:\Yuno\calendar2u-landing\vendor\kreait\firebase-php\src\Firebase\RemoteConfig\Template.php(46): Kreait\Firebase\RemoteConfig\Template::buildParameter('ads_probability', Array)

3 D:\Yuno\calendar2u-landing\vendor\kreait\firebase-php\src\Firebase\RemoteConfig.php(116): Kreait\Firebase\RemoteConfig\Template::fromArray(Array, 'etag-9636328607...')

4 D:\Yuno\calendar2u-landing\vendor\kreait\firebase-php\src\Firebase\RemoteConfig.php(31): Kreait\Firebase\RemoteConfig->buildTemplateFromResponse(Object(GuzzleHttp\Psr7\Response))

5 D:\Yuno\calendar2u-landing\app\Console\Commands\DGTest.php(60): Kreait\Firebase\RemoteConfig->get()

6 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): App\Console\Commands\DGTest->handle()

7 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

8 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))

9 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))

10 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Container\Container.php(651): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)

11 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Console\Command.php(139): Illuminate\Container\Container->call(Array)

12 D:\Yuno\calendar2u-landing\vendor\symfony\console\Command\Command.php(291): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

13 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Console\Command.php(124): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

14 D:\Yuno\calendar2u-landing\vendor\symfony\console\Application.php(1002): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

15 D:\Yuno\calendar2u-landing\vendor\symfony\console\Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\DGTest), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

16 D:\Yuno\calendar2u-landing\vendor\symfony\console\Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

17 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Console\Application.php(102): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

18 D:\Yuno\calendar2u-landing\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

19 D:\Yuno\calendar2u-landing\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

20 {main}

"}

Additional information

No response

jeromegamez commented 1 year ago

Thank you for reporting this!

Could you show me documentation or an example on how to add this personalization parameter in the Firebase Web Console? I'd like to be able to replicate the problem πŸ˜…

asyrafkindil-yuno commented 1 year ago

Hi. Here is documentation link on how to configure parameter personalization in the Firebase console. https://firebase.google.com/docs/remote-config/personalization/get-started?hl=en&authuser=0#2_configure_parameter_personalization_in_the

202209071038 Screenshot on personalization parameter value set up in console.

jeromegamez commented 1 year ago

Thank you for the link! Unfortunately, I currently cannot reproduce the problem because the Firebase Web Console shows a spinner of death when I try to store the updated remote config. I'll try again in the next days and hope it works then 🀞

jeromegamez commented 1 year ago

Hey @asyrafkindil-yuno - unfortunately, I still don't seem to be able to create a personalization an a parameter. I don't know the reason, but I still would like to be able to help, perhaps I can with a "dry run". Could you perhaps provide me with an export of your current Remote Config? Just in case: you can go to https://console.firebase.google.com/project/_/config and on that page click on the three dots above the parameters table. If there is sensitive data inside it, please replace the values or parameter names with some gibberish. The most important thing for me is to know the data structure of the Remote Config so that I can adapt the SDKs handling based on it.

Would you be willing to test this with me in a PR/branch when I make the changes?

jeromegamez commented 1 year ago

I'm onto something, so you don't need to send me an export of your remote config. I'll let you know once I find out more πŸ™πŸ»πŸ€žπŸ»

jeromegamez commented 1 year ago

@asyrafkindil-yuno Could you please check/test in your project if #733 works for you? The changes are quite complex and I would like to make sure that it works in real-life projects before merging them.

asyrafkindil-yuno commented 1 year ago

How do I require the development branch into my project? I have adjust the following composer.json but composer update failed. Can you help me here?

{
    "type": "project",
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/kreait/firebase-php.git"
        }
    ],
    "require": {
        "php": "^8.0",
        "doctrine/dbal": "^3.3",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.2",
        "inertiajs/inertia-laravel": "^0.6.3",
        "kreait/firebase-php": "remote-config-personalization",
        "laravel/framework": "^9.19",
        "laravel/jetstream": "^2.5",
        "laravel/sanctum": "^3.0",
        "laravel/telescope": "^4.9",
        "laravel/tinker": "^2.7",
        "maatwebsite/excel": "^3.1",
        "spatie/laravel-sitemap": "^6.2",
        "tightenco/ziggy": "^1.0"
    },
    "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"
    },
    "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"
        ],
        "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
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}
jeromegamez commented 1 year ago

You're almost there - you have to prepend a dev- in front of the branch name. 🀞🏻

PS: When posting code snippets, could you wrap the blocks?

// PHP Code
{"key": "value"}

image

https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting

asyrafkindil-yuno commented 1 year ago

I have finish testing using the #733 in my project and my remote config update is working now.

jeromegamez commented 1 year ago

Very good, thanks for testing! I will merge and release this in the next few hours! πŸ’ͺ🏻πŸ₯³