-
Notifications
You must be signed in to change notification settings - Fork 5
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 code analysis [WEB-2017] #688
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it, this is awesome!
I think we could use this in our other products, as well, so I think we should consider installing this in the data-hub-foundation
package.
.github/workflows/analyze.yml
Outdated
- name: Install PHP dependencies | ||
run: composer install --no-interaction --no-progress --no-scripts | ||
- name: Run PHP CodeSniffer | ||
run: ./vendor/bin/phpstan analyze --no-progress --no-interaction --no-ansi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command requires a path:
./vendor/bin/phpstan analyze --no-progress --no-interaction --no-ansi ./some/path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The paths are set in the phpstan.neon config file. Passing a path in the command line here would override the paths set in the config, so I think it's better managed there.
composer.json
Outdated
@@ -77,6 +77,7 @@ | |||
"mockery/mockery": "^1.0", | |||
"nunomaduro/collision": "^7.0", | |||
"orchestra/testbench": "^7.8 || ^8.0 || ^9.0", | |||
"phpstan/phpstan": "^1.12", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can/should we install and configure PHPStan in the data-hub-foundation
package, so we can use it in all of our projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I moved PHPStan into the data-hub-foundation and created a composer script to invoke it.
da7dc8e
to
dd54c6f
Compare
5745ae9
to
9194e51
Compare
Quality Gate passedIssues Measures |
Add PHPStan code analysis [WEB-2017]
No description provided.