Skip to content

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?

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.

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