Closed weierophinney closed 4 years ago
@Ocramius I can add phpstan on CI, but just a low level. Too many errors depends on other libraries.
Originally posted by @thomasvargiu at https://github.com/zendframework/zend-mvc/pull/296#issuecomment-429845580
@thomasvargiu that's fine - we can raise the level as we get better
Originally posted by @Ocramius at https://github.com/zendframework/zend-mvc/pull/296#issuecomment-429848539
@thomasvargiu btw, I still suggest getting rid of all the throw new SomeException($someString)
, and having throw SomeException::unexpectedType($expected, $actual)
instead
Originally posted by @Ocramius at https://github.com/zendframework/zend-mvc/pull/296#issuecomment-429881636
@Ocramius I'm still working on this. I set this PR as WIP
Originally posted by @thomasvargiu at https://github.com/zendframework/zend-mvc/pull/296#issuecomment-429882201
Done. Needs a complete review
Originally posted by @thomasvargiu at https://github.com/zendframework/zend-mvc/pull/296#issuecomment-429959339
Based on this https://github.com/laminas/technical-steering-committee/blob/429d1c7cd38bebd45aff08bfd61618726d9c6b03/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-static-analysis-tooling , we are going to use psalm.
I am closing this.
In order to bump to PHP 7 minimum version in the future, I used phpstan to static analyse the code, correcting some phpdoc errors and adding guards throwing exceptions when needed. Code quality will be improved when other components will be improved.
It's just a first step, but I think it will be useful.
I don't know if this could be considered a BC break, probably it isn't.
Originally posted by @thomasvargiu at https://github.com/zendframework/zend-mvc/pull/296