GitXplorerGitXplorer
b

phpstan-generate-ignores-list

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
df531f9b42c5a978c4c9ee99083e21a626c85e0c

Add instruction

bb1rdex committed 5 years ago
Verified
f72f0b077a0b392363bec66d8bfca9f637615372

Add files via upload

bb1rdex committed 5 years ago
Verified
c14004bf0e74b41898ae91c991a9ee1c6352110a

Update README.md

bb1rdex committed 5 years ago
Verified
3d7de60a21e47361d9208393d6577907dd95f0c9

Add files via upload

bb1rdex committed 5 years ago
Verified
629ef3cb2ae28e52d2df41c6e897811a5f23a2e7

Initial commit

bb1rdex committed 5 years ago

README

The README file for this repository.

phpstan-generate-ignores-list

Allows to generate phpstan config with ignores list based on phpstan report (some kind of baseline)

Steps to create baseline ignores list:

  1. Run phpstan to create errors list file: vendor/bin/phpstan analyse --memory-limit=-1 -l3 --error-format=json > phpstan-l3.json. You should note --error-format=json > phpstan-errors-list.json here, that's used to produce JSON of errors and put them to file phpstan-errors-list.json.
  2. Run script to generate phpstan ignores config: php phpstan-ignore.php phpstan-errors-list.json > phpstan-ignore-config.neon. You should note phpstan-errors-list.json — that's JSON you used on the previous step; and also phpstan-ignore-config.neon — that's where generated phpstan config will be written to.
  3. Include newly generated config to your main config file — add phpstan-ignore-config.neon to includes section of your main config. If you don't have a config file, or there is no includes section currently, here is the example: phpstan.neon:
includes:
    - phpstan-ignore-config.neon

That's it!