Skip to content

fix(*): operator == takes Object parameter #5443

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

Merged
merged 4 commits into from
Mar 25, 2021

Conversation

mockturtl
Copy link
Contributor

@mockturtl mockturtl commented Mar 23, 2021

Description

Replace operator ==(dynamic other) with operator ==(Object other) everywhere.

If this seems reasonable, I'll follow up on the checklist.

Related Issues

Fixes #5288

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@google-cla google-cla bot added the cla: yes label Mar 23, 2021
- replace `operator ==` overrides that accept `Object?`
@Salakar Salakar requested a review from rrousselGit March 24, 2021 01:07
Fixes two lines failing CI (lint: info `unnecessary_overrides`).

Since `firebase_core` depends on `firebase_core_platform_interface: ^4.0.0`,
and this commit changes a method signature in that dependency,
there is now an analysis error:

`test/firebase_core_test.dart:114:7 • invalid_implementation_override`

A version bump will resolve it.

Alternatively, we could skip this commit, and ignore the two `unnecessary_overrides`.
@mockturtl
Copy link
Contributor Author

mockturtl commented Mar 24, 2021

See commit log 015ede5 regarding the analyzer error in CI.

Edit: I see this is a job for Melos. I'll have to get familiar with it. :)

@rrousselGit
Copy link
Contributor

Looks reasonable, thanks!

The PR is marked as draft, is there anything else you want to add?

@mockturtl mockturtl marked this pull request as ready for review March 24, 2021 18:10
@mockturtl
Copy link
Contributor Author

The PR is marked as draft, is there anything else you want to add?

It should be good to go, thanks!

@google-cla
Copy link

google-cla bot commented Mar 24, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Mar 24, 2021
@rrousselGit
Copy link
Contributor

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Mar 24, 2021
Copy link
Member

@Salakar Salakar left a comment

Choose a reason for hiding this comment

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

LGTM

@Salakar Salakar changed the title fix: operator == takes Object parameter fix(*): operator == takes Object parameter Mar 25, 2021
@Salakar Salakar changed the title fix(*): operator == takes Object parameter fix(*): operator == takes Object parameter Mar 25, 2021
@Salakar Salakar self-requested a review March 25, 2021 11:42
@rrousselGit rrousselGit merged commit 88bb9dc into firebase:master Mar 25, 2021
@rrousselGit
Copy link
Contributor

Thanks!

@firebase firebase locked and limited conversation to collaborators Apr 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [cloud_firestore] 'Object.==' and Mockito
3 participants