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

linter: added undefinedClass and undefinedTrait checkers #1120

Merged
merged 7 commits into from
Aug 28, 2021

Conversation

i582
Copy link
Contributor

@i582 i582 commented Aug 28, 2021

  • Added new undefinedClass and undefinedTrait checkers
  • Removed undefinedType checker
  • Fixed a bug when it was forbidden to use self inside a trait
  • Types kmixed and future are now normalized to mixed
  • Special scalar types from Psalm are now normalized to regular ones
  • The never type has been added to the list of trivial types

The check for the class checks the following places:

  • Type hints
  • PHPDoc @param, @return, and @var
  • array, shape, tuple, union, nullable

Fixes #1115
Fixes #1116

@i582 i582 added the enhancement New feature or request label Aug 28, 2021
@i582 i582 added this to the Next milestone Aug 28, 2021
@i582 i582 changed the title linter: added check for undefined class in typehint and PHPDoc linter: added undefinedClass and undefinedTrait checkers Aug 28, 2021
@i582 i582 merged commit 94cf203 into master Aug 28, 2021
@i582 i582 deleted the pmakhnev/add_check_for_class_in_typehint branch August 28, 2021 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined class not found Undefined class not found
1 participant