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

ValueRange:getValues() returns null for empty sheet. #3679

Closed
scyzoryck opened this issue Oct 24, 2023 · 3 comments
Closed

ValueRange:getValues() returns null for empty sheet. #3679

scyzoryck opened this issue Oct 24, 2023 · 3 comments
Assignees
Labels
api: sheets Issues related to the Sheets API API.

Comments

@scyzoryck
Copy link

Environment details

  • OS: Linux
  • PHP version: 8.2
  • Package name and version:

Steps to reproduce

  1. Create an empty spreadsheet
  2. Try to fetch data from it.
  3. In result ValueRange:getValues() will return null what conflicts with the return type hint from the method.

Can we update the return type to null or array, please? :)

Code example

Related to: flow-php/flow#641

@saranshdhingra
Copy link

So, I discussed this issue internally, and we can't use Union types because we want to support PHP 7.4.
Regarding adding multiple types in the docbloc: These files are auto generated and it might be a while before we add provisions to put multiple return types(or nullable in this case) in the generator.

So, this issue might take a while to resolve.

I am sorry I don't come bearing better news, but I just wanted to update you what we discussed.

@scyzoryck
Copy link
Author

Thanks for update! It's good to see that feedback! :)

Best!

@saranshdhingra
Copy link

Closing this issue for now as the last comment still holds.
I will reopen/respond to this once something changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: sheets Issues related to the Sheets API API.
Projects
None yet
Development

No branches or pull requests

2 participants