Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Static analysis for WordPress plugins/themes #241

Open
szepeviktor opened this issue May 6, 2019 · 5 comments
Open

Static analysis for WordPress plugins/themes #241

szepeviktor opened this issue May 6, 2019 · 5 comments

Comments

@szepeviktor
Copy link

szepeviktor commented May 6, 2019

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
Copy link
Owner

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
Copy link
Author

and has more checks.

All right.

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

@paulgibbs
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

Implemented in #243

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

No branches or pull requests

2 participants