Skip to content

Commit ff777ba

Browse files
dmallory42kalessil
andauthored
Meetup: initial Setup of Psalm for WC Pay Client (Automattic#2337)
* Initial commit of Psalm introduction to the client * Setting up Psalm * update to Psalm config * Fixing spacing in composer.json * Fixing spacing in package.json * Fixing spacing in package.json * Newline at the end of psalm-loader.php * Fixing spacing in `psalm.xml` * Adding newline to psalm bash file. * Psalm: add missing immutable annotations * Psalm: keep fixing violations * Psalm: level 7 * Psalm: keep fixing violations * Psalm: keep fixing violations * Psalm: added to CI * Psalm: keep fixing violations * Psalm: fixed failing CI * Psalm: fixed rebase Co-authored-by: Vladimir Reznichenko <[email protected]>
1 parent 87c9aa9 commit ff777ba

27 files changed

+1373
-57
lines changed

.github/workflows/php-lint-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
tools: composer
2727
coverage: none
2828
# install dependencies and run linter
29-
- run: composer self-update 2.0.6 && composer install --no-progress && ./vendor/bin/phpcs --standard=phpcs.xml.dist $(git ls-files | grep .php$)
29+
- run: composer self-update 2.0.6 && composer install --no-progress && ./vendor/bin/phpcs --standard=phpcs.xml.dist $(git ls-files | grep .php$) && ./vendor/bin/psalm
3030

3131
test:
3232
name: PHP testing

bin/run-psalm.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
./vendor/bin/psalm $*

composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
"phpunit/phpunit": "7.5.20",
2424
"woocommerce/woocommerce-sniffs": "0.1.0",
2525
"woocommerce/action-scheduler": "3.1.6",
26-
"kalessil/production-dependencies-guard": "dev-master"
26+
"kalessil/production-dependencies-guard": "dev-master",
27+
"vimeo/psalm": "^4.8",
28+
"php-stubs/wordpress-stubs": "^5.7",
29+
"php-stubs/woocommerce-stubs": "^5.4"
2730
},
2831
"scripts": {
2932
"test": [

0 commit comments

Comments
 (0)