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

CloudMessage in service ? #32

Closed
xorgxx opened this issue Apr 24, 2021 · 4 comments
Closed

CloudMessage in service ? #32

xorgxx opened this issue Apr 24, 2021 · 4 comments

Comments

@xorgxx
Copy link

xorgxx commented Apr 24, 2021

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
Copy link
Member

jeromegamez commented Apr 24, 2021

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
Copy link
Author

xorgxx commented Apr 24, 2021

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
Copy link
Member

[...] 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
Copy link
Contributor

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.

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

No branches or pull requests

2 participants