-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Update SentMessage.php #43040
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
Update SentMessage.php #43040
Conversation
Sometimes the response from the server can be null, because of this, the application is terminated
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
@@ -36,7 +36,7 @@ public function getTransport(): string | |||
return $this->transport; | |||
} | |||
|
|||
public function setMessageId(string $id): void | |||
public function setMessageId(?string $id): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to avoid calls to this method with null if possible.
Which transport are you using ? |
firebase - Symfony\Component\Notifier\Bridge\Firebase |
Yes please check and only call setMessageId in the Firebase transport if it's a string |
i can modify Symfony\Component\Notifier\Bridge\Firebase\FirebaseTransport.php |
I saw that you removed your fork. |
@dima-gr Your suggestion is indeed the fix that I would like to see. |
This PR was submitted for the 5.4 branch but it was squashed and merged into the 5.3 branch instead. Discussion ---------- [Notifier] Update FirebaseTransport.php prevent setting null value from firebase response, previous pull request - #43040 | Q | A | ------------- | --- | Branch? | 5.4 for features / 4.4 or 5.3 for bug fixes <!-- see below --> | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Never break backward compatibility (see https://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - Features and deprecations must be submitted against branch 5.x. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry --> Commits ------- b9ab0ad [Notifier] Update FirebaseTransport.php
Sometimes the response from the server can be null, because of this, the application is terminated