Skip to content

Bump psalm to v4.9.2 #151

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Bump psalm to v4.9.2 #151

wants to merge 1 commit into from

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Aug 3, 2021

@simPod simPod marked this pull request as ready for review August 3, 2021 08:45
@mnapoli
Copy link
Member

mnapoli commented Aug 3, 2021

Thanks!

I'll wait for a 3rd party approbation. I keep merging Psalm PRs on this project, and it seems half of them breaks something for someone ^^ I don't know enough Psalm to validate the annotation changes honestly.

Copy link
Contributor Author

@simPod simPod left a comment

Choose a reason for hiding this comment

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

Sure, added explanatory comments just fyi

@@ -126,7 +125,6 @@ public function getKey()

/**
* @psalm-pure
* @psalm-suppress InvalidCast
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 is unused

@@ -186,7 +185,6 @@ public static function values()
* Returns all possible values as an array
*
* @psalm-pure
* @psalm-suppress ImpureStaticProperty
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 is unused

@@ -176,6 +174,7 @@ public static function values()

/** @psalm-var T $value */
foreach (static::toArray() as $key => $value) {
/** @psalm-suppress UnsafeGenericInstantiation */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO true, generic params may indeed be constrained in children

@@ -297,6 +295,7 @@ public static function __callStatic($name, $arguments)
$message = "No static method or enum constant '$name' in class " . static::class;
throw new \BadMethodCallException($message);
}
/** @psalm-suppress UnsafeGenericInstantiation */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO true, generic params may indeed be constrained in children

- Lock to v4.9 otherwise it bumps automatically, finds new issues and builds start failing without any change in this lib
- fix some psalm issues
- enable `findUnusedPsalmSuppress`
@thedotedge
Copy link

hi, any plans to merge it?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing unnecessary psalm suppress docblock Build Failing due to psalm update
3 participants