kreait / firebase-bundle

A Symfony Bundle for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
135 stars 25 forks source link

CloudMessage in service ? #32

Closed xorgxx closed 3 years ago

xorgxx commented 3 years ago

Hi i'm trying to use in service but it seemce i get issue :

[EA] New value type (\Kreait\Firebase\Messaging\CloudMessage) is not matching the resolved parameter type and might introduce types-related false-positives.

it das not send any think.

note : that the same code working perfect in controller but not as service.

thank for help.

use Kreait\Firebase\Messaging;
use Kreait\Firebase\Messaging\AndroidConfig;
use Kreait\Firebase\Messaging\ApnsConfig;
use Kreait\Firebase\Messaging\CloudMessage;
use Kreait\Firebase\Messaging\Notification;

            $message = CloudMessage::new()
                ->withNotification($notification)
                ->withDefaultSounds() // Enables default notifications sounds on iOS and Android devices.
                ->withApnsConfig(
                    ApnsConfig::new()
                        ->withSound('raw/notif.mp3')
                        ->withBadge(1)
                )
                ->withData($msg);
jeromegamez commented 3 years ago

I'll need some more information to give an answer of any kind πŸ˜…. Please share the code that leads to the issue, best would be something that I can reproduce. Also, which version of PHP, Symfony and the bundle you are using.

xorgxx commented 3 years ago

it semce that now it send but still having this message. is the full code of the service will be ok with ver. php?

jeromegamez commented 3 years ago

[...] is not matching the resolved parameter type and might introduce types-related false-positives.

This sounds as if you're using the $message as a parameter/return value somewhere else and there the parameter type is something else.

But I can only guess, your shared code doesn't give hints on how or where this happens, it's just the creation of a CloudMessage πŸ˜…

Do you believe this is a bug in the bundle/SDK? Otherwise, perhaps Discord would be a better place for "How to use" or PHP Inspections Plug-in related discussions ☺️

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.