Skip to content

Commit ce4519e

Browse files
anomiexzinigorsdixon194samiff
authored
Phan: Add phan deps and cli wrapper (#36333)
Per pdWQjU-IH-p2, we're going to use Phan for PHP static analysis. This commit adds the phan composer deps and a wrapper for the Jetpack CLI. It also adds the php-ast extension inside the Docker env, and adds some docs about running Phan. --------- Co-authored-by: Igor Zinovyev <[email protected]> Co-authored-by: Steve D <[email protected]> Co-authored-by: Samiff <[email protected]>
1 parent c5f18aa commit ce4519e

File tree

7 files changed

+2316
-119
lines changed

7 files changed

+2316
-119
lines changed

.github/workflows/linting.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
composer install --ignore-platform-reqs
190190
# Remove stuff we don't need here that fails some platform reqs.
191191
# This will complain if we missed any.
192-
composer remove --dev sirbrillig/phpcs-changed automattic/jetpack-codesniffer
192+
composer remove --dev sirbrillig/phpcs-changed automattic/jetpack-codesniffer phan/phan
193193
194194
- name: Run linter
195195
run: |

composer.json

+4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
"automattic/jetpack-codesniffer": "@dev",
1212
"automattic/jetpack-phpcs-filter": "@dev",
1313
"dealerdirect/phpcodesniffer-composer-installer": "1.0.0",
14+
"phan/phan": "^5.4",
1415
"php-parallel-lint/php-parallel-lint": "1.3.2",
16+
"php-stubs/wordpress-stubs": "^6.4.3",
17+
"php-stubs/wordpress-tests-stubs": "^6.3",
18+
"php-stubs/wp-cli-stubs": "^2.10",
1519
"sirbrillig/phpcs-changed": "2.11.4",
1620
"squizlabs/php_codesniffer": "^3.6.2"
1721
},

0 commit comments

Comments
 (0)