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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [cloud_firestore] CollectionReferenceWeb uses implements instead of extends, makes CollectionReferencePlatform fragile #8095

Open
collinjackson opened this issue Feb 16, 2022 · 1 comment
Labels
platform: all Issues / PRs which are for all platforms. plugin: cloud_firestore type: bug Something isn't working

Comments

@collinjackson
Copy link
Contributor

collinjackson commented Feb 16, 2022

Bug report

Describe the bug
QueryPlatform.verifyExtends does not call PlatformInterface.verifyToken if the instance being verified is an instance of CollectionReferencePlatform. Instead it could call either QueryPlatform.verifyExtends or CollectionReferencePlatform.verifyExtends depending on the type of the instance.

As a result, CollectionReferenceWeb is able to implement CollectionReferencePlatform without extending it.

Steps to reproduce

Steps to reproduce the behavior:

  1. Add a new method to CollectionReferencePlatform and release as a "minor" update.
  2. Compile error in CollectionReferenceWeb: method is not implemented.

Expected behavior

When _JsonQuery calls QueryPlatform.verifyExtends on a CollectionReferencePlatform instance, the implementation of QueryPlatform.verifyExtends should call PlatformInterface.verifyToken even if _delegate is a CollectionReferencePlatform.

@collinjackson collinjackson added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Feb 16, 2022
@collinjackson collinjackson changed the title 馃悰 [cloud_firestore] QueryPlatform.verifyExtends should not skip instances of CollectionReferencePlatform 馃悰 [cloud_firestore] CollectionReferenceWeb uses implements instead of extends, makes CollectionReferencePlatform fragile Feb 16, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label Feb 17, 2022
@darshankawar
Copy link

/cc @Salakar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: all Issues / PRs which are for all platforms. plugin: cloud_firestore type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants