@@ -42,33 +42,6 @@ commands:
42
42
composer require mglaman/phpstan-drupal *@dev
43
43
cp ~/repo/tests/fixtures/config/drupal-phpstan.neon /tmp/drupal/phpstan.neon
44
44
./vendor/bin/phpstan --version
45
- global-require :
46
- steps :
47
- - run :
48
- name : Add PHPStan
49
- command : |
50
- composer global require phpstan/phpstan
51
- - run :
52
- name : Remove vendor directory
53
- command : |
54
- rm -rf vendor
55
- - run :
56
- name : Add project as a global dependency
57
- command : |
58
- composer global config repositories.phpstanDrupal '{"type": "path", "url": "~/repo", "options": { "symlink": false }}'
59
- - run :
60
- name : Add globally
61
- command : |
62
- composer global require mglaman/phpstan-drupal *@dev
63
- - run :
64
- name : Add Composer global path
65
- command : |
66
- echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> $BASH_ENV
67
- echo $BASH_ENV
68
- - run :
69
- name : Check drupal-check can be executed
70
- command : |
71
- phpstan --version
72
45
jobs :
73
46
build :
74
47
<< : *defaults
@@ -94,16 +67,32 @@ jobs:
94
67
name : Run against a file
95
68
command : |
96
69
cd /tmp/drupal
97
- ./vendor/bin/phpstan analyze core/install.php
70
+ ./vendor/bin/phpstan analyze core/install.php --debug
71
+ - run :
72
+ name : Run against a module
73
+ command : |
74
+ cd /tmp/drupal
75
+ ./vendor/bin/phpstan analyze core/modules/dynamic_page_cache --debug
76
+ test_drupal_project :
77
+ << : *defaults
78
+ steps :
79
+ - start-project
80
+ - create-drupal-project
81
+ - local-require
82
+ - run :
83
+ name : Run against a file
84
+ command : |
85
+ cd /tmp/drupal
86
+ ./vendor/bin/phpstan analyze web/core/install.php --debug
98
87
- run :
99
88
name : Run against a module
100
89
command : |
101
90
cd /tmp/drupal
102
- ./vendor/bin/phpstan analyze core/modules/dynamic_page_cache | grep -q "not found and could not be autoloaded." && false || true
103
-
91
+ ./vendor/bin/phpstan analyze web/core/modules/dynamic_page_cache --debug
104
92
workflows :
105
93
version : 2
106
94
tests :
107
95
jobs :
108
96
- build
109
97
- test_drupal
98
+ - test_drupal_project
0 commit comments