Skip to content

add phpstan to ci build #74

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 12 commits into from
Nov 3, 2021
Merged

add phpstan to ci build #74

merged 12 commits into from
Nov 3, 2021

Conversation

dbu
Copy link
Contributor

@dbu dbu commented Oct 25, 2021

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #73
Documentation -
License MIT

What's in this PR?

Run phpstan on the codebase and fix things that phpstan discovers.

Why?

#73 reported that some cache implementations can have null data even if the cache is a hit.

@@ -2,6 +2,8 @@ name: tests

on:
push:
branches:
- master
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this prevents us from running every build twice


return new FulfilledPromise($response);
}
if (is_array($data)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

phpstan does not complain, but CacheItem::get is defined to return mixed. in some situations, the cache might return something that is not an array.

@dbu dbu requested a review from Nyholm October 25, 2021 07:09
@dbu dbu merged commit 995a63f into master Nov 3, 2021
@dbu dbu deleted the phpstan branch November 3, 2021 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning: array_key_exists() expects parameter 2 to be array, null given
1 participant