humanmade / authorship

A modern approach to author attribution in WordPress.
GNU General Public License v3.0
66 stars 7 forks source link

Remove redundant PHPStan config lines #82

Closed szepeviktor closed 3 years ago

szepeviktor commented 3 years ago

From https://github.com/johnbillion/args/pull/7#issuecomment-855484516

szepeviktor commented 3 years ago

@johnbillion It does not start :(

szepeviktor commented 3 years ago

AFAIK These are real problems.

johnbillion commented 3 years ago

I remember the reason for these scanFiles entries now. plugin.php handles the file loading with require_once calls, so PHPStan needs to be told about which files are loaded. The use of the GUEST_ROLE and TAXONOMY constants are correct.

If those files are removed from scanFiles then PHPStan no longer knows they're loaded and triggers those errors.

szepeviktor commented 3 years ago

so PHPStan needs to be told about which files are loaded

Why does not PHPStan triggers those errors in CI? https://github.com/humanmade/authorship/pull/82/files

szepeviktor commented 3 years ago

I see! Those constants come from scanFiles.