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

Add static type checking! #111

Merged
merged 7 commits into from
Feb 7, 2020
Merged

Add static type checking! #111

merged 7 commits into from
Feb 7, 2020

Conversation

jarstelfox
Copy link
Contributor

Let's use https://psalm.dev/ for static type checking!

For some reason psalm doesnt like get_called_class even when I tried to stub it to
explain to psalm this method was pure (immutable)

Instead lets use another valid method for getting the late static bond class name
Lets static type check all pulls
@mnapoli
Copy link
Member

mnapoli commented Feb 7, 2020

Awesome thank you! I just spent time adding Psalm annotations in a project using php-enum, having them here is perfect!

@mnapoli mnapoli merged commit ff059b0 into myclabs:master Feb 7, 2020
@michaljusiega
Copy link

"vimeo/psalm": "^3.8" should be added as require-dev ?

To my project was added unnecessary dependencies IMHO.

Package operations: 10 installs, 1 update, 0 removals
  - Installing webmozart/path-util (2.3.0): Loading from cache
  - Installing webmozart/glob (4.1.0): Loading from cache
  - Installing openlss/lib-array2xml (1.0.0): Loading from cache
  - Installing netresearch/jsonmapper (v1.6.0): Loading from cache
  - Installing felixfbecker/language-server-protocol (v1.4.0): Loading from cache
  - Installing felixfbecker/advanced-json-rpc (v3.0.4): Loading from cache
  - Installing composer/xdebug-handler (1.4.0): Loading from cache
  - Installing amphp/amp (v2.4.0): Loading from cache
  - Installing amphp/byte-stream (v1.7.2): Loading from cache
  - Installing vimeo/psalm (3.8.3): Loading from cache
  - Updating myclabs/php-enum (1.7.2 => 1.7.3): Loading from cache

@mnapoli
Copy link
Member

mnapoli commented Feb 7, 2020

@michaljusiega good catch, thank you for the quick report I missed this.

It's OK, I will tag a new release in just a moment.

@michaljusiega
Copy link

Thank you : >

@jarstelfox
Copy link
Contributor Author

@michaljusiega good catch! Sorry about that, my intent was to add it to dev! @mnapoli thanks for handling that

@mnapoli
Copy link
Member

mnapoli commented Feb 7, 2020

No worries, I just pushed and tagged a new release.

Thanks!

@michaljusiega
Copy link

1.7.4 is working, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants