wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 15 forks source link

Use PHPStan for Static Analysis #189

Closed swissspidy closed 3 years ago

swissspidy commented 3 years ago

Issue Overview

Something like https://packagist.org/packages/szepeviktor/phpstan-wordpress or even just PHPStan directly with custom stubs will be very useful for finding issues in the codebase using static analysis.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Versions

Additional context

szepeviktor commented 3 years ago

even just PHPStan directly with custom stubs

😿

swissspidy commented 3 years ago

@szepeviktor Feels like you have your eyes everywhere 😄

Since this repo requires PHP 7.1+ I think there's no reason not to use your package directly 🙂

szepeviktor commented 3 years ago

Feels like you have your eyes everywhere 😄

Google Alerts

kép

szepeviktor commented 3 years ago

Since this repo requires PHP 7.1+

I keep mine matched to PHPStan "php": "^7.1|^8.0"

https://github.com/phpstan/phpstan/blob/83bc73c6972bb4dabc7e543656c25aad68b0fa05/composer.json#L5-L7

swissspidy commented 3 years ago

Yup, I meant the Traduttore repo requires 7.1+, so it's a nice fit.

swissspidy commented 3 years ago

@ocean90 Wanna run this on Travis too?

szepeviktor commented 3 years ago

LGTM https://github.com/wearerequired/traduttore/pull/191