Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
dima-gr wants to merge1 commit intosymfony:5.4fromdima-gr:5.4
Closed

Update SentMessage.php#43040

dima-gr wants to merge1 commit intosymfony:5.4fromdima-gr:5.4

Conversation

@dima-gr
Copy link
Contributor

Sometimes the response from the server can be null, because of this, the application is terminated

QA
Branch?5.4 for features / 4.4 or 5.3 for bug fixes
Bug fix?yes/no
New feature?yes/no
Deprecations?yes/no
TicketsFix #...
LicenseMIT
Doc PRsymfony/symfony-docs#...

Sometimes the response from the server can be null, because of this, the application is terminated
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.4 branch.

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!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

}

publicfunctionsetMessageId(string$id):void
publicfunctionsetMessageId(?string$id):void
Copy link
Member

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.

OskarStark and dmaicher reacted with thumbs up emoji
@OskarStark
Copy link
Contributor

Which transport are you using ?

@dima-gr
Copy link
ContributorAuthor

dima-gr commentedSep 16, 2021
edited
Loading

firebase - Symfony\Component\Notifier\Bridge\Firebase
and when the response comes null, then in the logs appears warning that the unknown index 'message_id', and then a critical error that the parameter cannot be null
$sentMessage->setMessageId($success['results'][0]['message_id']);
you can try to check for the existence of id in the response, if it does not exist, then pass an empty string to setMessageId. Maybe it will be better

@OskarStark
Copy link
Contributor

OskarStark commentedSep 16, 2021
edited
Loading

Yes please check and only call setMessageId in the Firebase transport if it's a string

@dima-gr
Copy link
ContributorAuthor

i can modify Symfony\Component\Notifier\Bridge\Firebase\FirebaseTransport.php
and check something like that
$sentMessage->setMessageId(isset($success['results'][0]['message_id']) ? : '');
and then make pull request

@nicolas-grekas
Copy link
Member

I saw that you removed your fork.
Please submit the PR again when you're ready, and please take time to properly fill in the PR template, the commit message, add a test case if possible also.
Thanks.

@nicolas-grekasnicolas-grekas added this to the5.4 milestoneSep 17, 2021
@fabpot
Copy link
Member

@dima-gr Your suggestion is indeed the fix that I would like to see.

fabpot added a commit that referenced this pull requestSep 19, 2021
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.phpprevent 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 peopleunderstand your PR and can be used as a start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Never break backward compatibility (seehttps://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 followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry-->Commits-------b9ab0ad [Notifier] Update FirebaseTransport.php
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@OskarStarkOskarStarkAwaiting requested review from OskarStarkOskarStark is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@dima-gr@carsonbot@OskarStark@nicolas-grekas@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp