Skip to content

[BUGFIX] Avoid crash during interface checks on non-existing classes#5984

Merged
muglug merged 1 commit intovimeo:masterfrom
ohader:issue-5983
Jun 22, 2021
Merged

[BUGFIX] Avoid crash during interface checks on non-existing classes#5984
muglug merged 1 commit intovimeo:masterfrom
ohader:issue-5983

Conversation

@ohader
Copy link
Copy Markdown
Contributor

@ohader ohader commented Jun 22, 2021

ClassLikes::classImplements(NonExisting::class, WellKnown::class)
now returns false instead of throwing an exception for non-existing
classes.

Fixes: #5983

@ohader ohader marked this pull request as draft June 22, 2021 20:52
`ClassLikes::classImplements(NonExisting::class, WellKnown::class)`
now returns `false` instead of throwing an exception for non-existing
classes.

Fixes: vimeo#5983
@ohader ohader marked this pull request as ready for review June 22, 2021 21:05
@muglug muglug merged commit b07de1f into vimeo:master Jun 22, 2021
@muglug
Copy link
Copy Markdown
Collaborator

muglug commented Jun 22, 2021

Thanks!

@ohader ohader deleted the issue-5983 branch June 22, 2021 22:19
ohader added a commit to ohader/psalm that referenced this pull request Feb 20, 2024
Similar to the behavior of `ClassLikes::classImplements()` (vimeo#5984),
the following methods will return a false/empty value in case a
specific class name has not been initialized yet:

+ `ClassLikes::classExtends()` returns `false`
+ `ClassLikes::getParentInterfaces()` returns `[]`
ohader added a commit to ohader/psalm that referenced this pull request Feb 20, 2024
Similar to the behavior of `ClassLikes::classImplements()` (vimeo#5984),
the following methods will return a false/empty value in case a
specific class name has not been initialized yet:

+ `ClassLikes::classExtends()` returns `false`
+ `ClassLikes::getParentInterfaces()` returns `[]`
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.

Non-existing class crashes in ForeachAnalyzer

2 participants