Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add V2 of redjan/fcm-bundle #1747

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add V2 of redjan/fcm-bundle #1747

wants to merge 2 commits into from

Conversation

redjanym
Copy link
Contributor

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) January 27, 2025 23:35
Copy link

github-actions bot commented Jan 27, 2025

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1747/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1747/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'redjanym/fcm-bundle:^2.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

redjanym/fcm-bundle

1.1 vs 2.0
diff --git a/redjanym/fcm-bundle/1.1/config/packages/redjan_ym_fcm.yaml b/redjanym/fcm-bundle/2.0/config/packages/redjan_ym_fcm.yaml
index 1d6e668a..ab12591a 100644
--- a/redjanym/fcm-bundle/1.1/config/packages/redjan_ym_fcm.yaml
+++ b/redjanym/fcm-bundle/2.0/config/packages/redjan_ym_fcm.yaml
@@ -1,2 +1,2 @@
 redjan_ym_fcm:
-    firebase_api_key: '%env(resolve:FCM_SERVER_KEY)%'
+    service_account_file: '%env(resolve:FCM_DEFAULT_SERVICE_ACCOUNT_FILE_PATH)%'
diff --git a/redjanym/fcm-bundle/1.1/manifest.json b/redjanym/fcm-bundle/2.0/manifest.json
index e712b9af..15564cff 100644
--- a/redjanym/fcm-bundle/1.1/manifest.json
+++ b/redjanym/fcm-bundle/2.0/manifest.json
@@ -6,6 +6,6 @@
         "config/": "%CONFIG_DIR%/"
     },
     "env": {
-        "FCM_SERVER_KEY": "YOUR_FIREBASE_CLOUD_MESSAGING_SERVER_KEY"
+        "FCM_DEFAULT_SERVICE_ACCOUNT_FILE_PATH": "YOUR_FCM_SERVICE_ACCOUNT_FILE_ABSOLUTE_PATH"
     }
 }

auto-merge was automatically disabled January 27, 2025 23:54

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) January 27, 2025 23:54
@@ -0,0 +1,2 @@
redjan_ym_fcm:
service_account_file: '%env(resolve:FCM_DEFAULT_SERVICE_ACCOUNT_FILE_PATH)%'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you don't call it a default service account file in the bundle, env doesn't need it as well.

Suggested change
service_account_file: '%env(resolve:FCM_DEFAULT_SERVICE_ACCOUNT_FILE_PATH)%'
service_account_file: '%env(resolve:FCM_SERVICE_ACCOUNT_FILE_PATH)%'

"config/": "%CONFIG_DIR%/"
},
"env": {
"FCM_DEFAULT_SERVICE_ACCOUNT_FILE_PATH": "YOUR_FCM_SERVICE_ACCOUNT_FILE_ABSOLUTE_PATH"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've assumed it's a json from https://github.com/redjanym/FCMBundle/wiki/Installation#step-3-configuration

Suggested change
"FCM_DEFAULT_SERVICE_ACCOUNT_FILE_PATH": "YOUR_FCM_SERVICE_ACCOUNT_FILE_ABSOLUTE_PATH"
"FCM_SERVICE_ACCOUNT_FILE_PATH": "%kernel.project_dir%/path/to/file.json"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants