Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHPStan settings #204

Closed
wants to merge 2 commits into from
Closed

Add PHPStan settings #204

wants to merge 2 commits into from

Conversation

ernilambar
Copy link
Member

Fixes #203

  • Add required composer packages for PHPStan
  • Add szepeviktor/phpstan-wordpress as PHPStan extension for WordPress
  • Add script to run test "phpstan": "run-phpstan-tests",
  • Add run-phpstan-tests file in bin folder

@ernilambar
Copy link
Member Author

Test repo - ernilambar/database-command#15

Sample neon file:

parameters:
  level: 0
  paths:
    - command.php
    - src/
  scanFiles:
    - command.php
  treatPhpDocTypesAsCertain: false

@ernilambar
Copy link
Member Author

ernilambar commented May 16, 2024

Looks like PHPStan cannot be installed in PHP less than 7.1. 🤔

@swissspidy
Copy link
Member

Ah yes, it has different PHP version requirements... Forgot about that when I opened the issue.

@ernilambar ernilambar closed this by deleting the head repository Jul 23, 2024
@ernilambar
Copy link
Member Author

This would have been surely good addition. We should revisit this later.

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

Successfully merging this pull request may close these issues.

Add PHPStan support
2 participants