24 Pull Requests
vimeo

vimeo/psalm

A static analysis tool for finding errors in PHP applications
PHP
View on GitHub https://psalm.dev
bug
documentation
help-wanted
enhancement
good first issue
Contribulator score: 44 Last scored 2023-11-08 01:31:58 UTC
Contributors (2)
  • orklah
  • ricardoboss

Pull requests (23)

orklah

capitalize properties to vimeo/psalm 2022-12-04 16:19:22 UTC

Properties became case sensitive in propertyMap (because they are in PHP) but we forgot to fix the casing for existing properties. I probably missed a few, but this should solve the majority of them

orklah

fix missing break handling in loop to vimeo/psalm 2022-12-04 13:06:04 UTC

fix https://github.com/vimeo/psalm/issues/8819

Not sure if it was the intended way to fix that but it kinda mimics the switch break handling and it works :)

orklah

Composer 2.1 to vimeo/psalm 2021-12-23 09:05:14 UTC

This is a draft not meant to be merged for now

This reverts the CI to run on Composer 2.1. For a mysterious reason, Composer 2.2 makes CI hangs.

https://blog.packagist.com/composer-2-2/ warned that:

> Please beware, the prompt…

orklah

allow phpcodesniffer-composer-installer plugin to vimeo/psalm 2021-12-23 08:48:06 UTC

Looks like CI has switched on composer 2.2 and it now warns that a plugin is not allowed.

I'm not sure what the source of the plugin is but I guess there is no reason not to allow it, given it was executed before

orklah

flag the context as "inside_conditional" when analyzing leftover cases to prevent emitting unused error to vimeo/psalm 2021-12-22 20:52:13 UTC

This should fix #6389

This was due to the analyzing the function call when no insideUse was flagged. Psalm emits an Unused erro…

orklah

fix wrong handling of flags in context to vimeo/psalm 2021-12-20 23:02:50 UTC

This PR started when I noticed a weird handling of inside_conditional flag in switch. After looking for more I found a few.

After that, I noticed that we don't always unflag those before leaving an analyzer, mainly when the other anal…

ricardoboss

Added pure annotations to enum functions to vimeo/psalm 2021-12-20 22:21:05 UTC

Fixes #7086

orklah

allow destructuring on a possible null variable as long as there is an array alongside to vimeo/psalm 2021-12-20 21:51:23 UTC

This PR will fix https://github.com/vimeo/psalm/issues/7151 by only emitting PossiblyNullArrayAccess if there was no successful destructuring (as this is not a PHP issue nor a user error)

Also, this adds null to the generated type i…

orklah

fix other occurences of getAttributes to vimeo/psalm 2021-12-20 09:20:10 UTC

#7189 was successful. This PR will fix other cases of getAttributes that behaves the same way

orklah

fix #7178 again to vimeo/psalm 2021-12-20 09:00:32 UTC

The fix in #7180 for #7178 was not correct. The test I made was passing because array<ReflectionAttribute<empty>> is an acceptable value for array<ReflectionAttribute<object>>. This PR should fix the issue and fix the test

orklah

doesn't infer empty for ReflectionClass::getAttributes without params to vimeo/psalm 2021-12-16 22:39:43 UTC

orklah

fix CI to vimeo/psalm 2021-12-13 22:42:05 UTC

This fixes a new error in CI that seem due to https://github.com/php/php-src/pull/7196 where the isStatic method was moved from ReflectionMethod to ReflectionFunctionAbstract

orklah

display class-strings in keyed arrays syntax and allow using them for assertions to vimeo/psalm 2021-12-13 22:19:54 UTC

This aims to fix https://github.com/vimeo/psalm/issues/7109

orklah

fix some more expressions that can be replaced by getSingleAtomic to vimeo/psalm 2021-12-11 21:44:29 UTC

cc @AndrolGenhald :)

orklah

fix reconciliation between positive-int and inferior/superior assertions to vimeo/psalm 2021-12-08 21:19:17 UTC

This will fix https://github.com/vimeo/psalm/issues/7098

It also fix an issue where adding a positive-int or integer-range to an existing union with literals would wipe every literal, even if they were not included in the said type

orklah

don't stop analyzing array, even if we already have a type and we can't create an object like to vimeo/psalm 2021-12-07 18:40:11 UTC

The goal is to fix https://github.com/vimeo/psalm/issues/7090

But seeing the change I had to do, it'll probably break something elsewhere, Let's run the CI!

orklah

Don't crash when checking purity of __callStatic in a trait to vimeo/psalm 2021-12-06 18:08:50 UTC

This will fix https://github.com/vimeo/psalm/issues/7081 (where this crashes: https://psalm.dev/r/a36ee9d0d8)

It seems that using getAppearingMethodId doesn't return anything when the method only exists in a trait, so I handled this…

ricardoboss

Make name property of enum cases return non-empty-strings to vimeo/psalm 2021-12-05 23:34:49 UTC

This is a follow-up for #6964 since the changes made there didn't have the desired outcome.

ricardoboss

Fixed vimeo/psalm#6966 to vimeo/psalm 2021-12-05 15:59:42 UTC

ricardoboss

Fix #6968: PHP_INT_MAX isn't positive to vimeo/psalm 2021-12-05 14:44:56 UTC

orklah

fix missing case for displaying varId to vimeo/psalm 2021-12-03 22:47:59 UTC

This fix https://github.com/vimeo/psalm/issues/6933

The message is a little weird because it says Cannot access value on variable ARR when it's a constant, but it's not a big deal.

Didn't add test because this is just a wording i…

orklah

flag usage of get_class outside class without args to vimeo/psalm 2021-12-01 22:16:47 UTC

orklah

document the behavior of methods in IssueBuffer to vimeo/psalm 2021-12-01 20:05:56 UTC

This documents my findings when looking at https://github.com/vimeo/psalm/issues/7038

  • Sponsored by  DNSimple,  Octobox &  Bugsnag
  • About
  • How to contribute?
  • Contributor pledge
  • API
  • Unsubscribe
    •  English
    •  Español
    •  Ελληνικά
    •  Português do Brasil
    •  Suomi
    •  Français
    •  Deutsch
    •  Русский
    •  Українська
    •  ไทย
    •  Italiano
    •  Norsk bokmål
    •  தமிழ்
    •  Tr
    •  简体中文
    •  正體中文
    •  日本語
    •  Čeština
    •  हिंदी
    •  Polski
    • Translate into your language!