Inspect the feasibility of using a code analyzer to decrease run-time errors #7973
Replies: 5 comments
-
Were you thinking of trying to use it during the validation tests with Travis? |
Beta Was this translation helpful? Give feedback.
-
Yeah, given that we don't have a tons of unit tests, anything that helps mitigating unexpected errors automatically, sounds great for me. |
Beta Was this translation helpful? Give feedback.
-
I have a bunch of these note-to-self issues scattered around too. As long as it's something you really plan to get to, I'm ok leaving them filed here. |
Beta Was this translation helpful? Give feedback.
-
Ok! So I'll use this issue to keep related resources. In order to auto-refactor code to use newer PHP features (it might probably cover deprecations), we can use the https://github.com/rectorphp/rector |
Beta Was this translation helpful? Give feedback.
-
Here's an article comparing Psalm, PHPStan and Phan: Like Typescript, such tools might have plugins to help with the types of popular libraries: |
Beta Was this translation helpful? Give feedback.
-
Describe the problem you would like to solve
Due to the nature of PHP, it's challenging to detect simple run-time errors due to broken typing promises.
Describe the solution you'd like
Investigate whether Psalm, is able to help us mitigate such errors at building-time.
Perhaps it will produce too much noise, due to untyped 3rd-party code (they do have plugins to improve the type handling for some libraries).
Who is asking for this feature?
Developer
Beta Was this translation helpful? Give feedback.
All reactions