paulgibbs / behat-wordpress-extension

WordHat: Behat for WordPress
https://wordhat.info
GNU General Public License v3.0
106 stars 20 forks source link

Static analysis for WordPress plugins/themes #241

Open szepeviktor opened 5 years ago

szepeviktor commented 5 years ago

This package could help while testing code for WordPress https://packagist.org/packages/szepeviktor/phpstan-wordpress It doesn't need additional code, it is static analysis.

I think many of you are interested.

paulgibbs commented 5 years ago

Hi @szepeviktor

I just wanted to say thank you very much for trying WordHat and for leaving useful feedback and comments here!

Given the only WordPress code in this package is for the WP-PHP driver, it looks like this might be useful. It’s a young package though (0.1.x) so I think I will wait some months and test this phpStan extension once it has matured a bit and has more checks.

szepeviktor commented 5 years ago

and has more checks.

All right.

Actually it has no checks at all, it enables PHPStan to do its work.

paulgibbs commented 5 years ago

Then can I suggest a better readme on your project there? I only know the basic ideas about phpstan (this project is the first and only time I've used it, so far), so I'm not sure what dropping in a WordPress-specific extension will do.

szepeviktor commented 5 years ago

what dropping in a WordPress-specific extension will do.

It is not much but enough:

  1. WordPress stubs
  2. Handle some special functions in WordPress, see the src/ directory
szepeviktor commented 5 years ago

Implemented in #243