File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 12
12
13
13
jobs :
14
14
phpstan :
15
+ name : PHPStan
15
16
runs-on : ubuntu-latest
16
17
steps :
17
18
- name : Check out code
45
46
run : vendor/bin/phpstan
46
47
analyse
47
48
--error-format=github
49
+
50
+ require-checker :
51
+ name : Require checker
52
+ runs-on : ubuntu-latest
53
+ steps :
54
+ - name : Check out code
55
+ uses : actions/checkout@v2
56
+
57
+ - name : Setup PHP
58
+ uses : shivammathur/setup-php@v2
59
+
60
+ - name : Get Composer Cache Directory
61
+ id : composer-cache
62
+ run : |
63
+ echo "::set-output name=dir::$(composer config cache-files-dir)"
64
+
65
+ - name : Cache Composer packages
66
+ uses : actions/cache@v3
67
+ with :
68
+ path : ${{ steps.composer-cache.outputs.dir }}
69
+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
70
+ restore-keys : |
71
+ ${{ runner.os }}-composer-
72
+
73
+ - name : Install dependencies
74
+ run : composer update
75
+ --no-ansi
76
+ --no-interaction
77
+ --no-progress
78
+ --no-suggest
79
+ --prefer-dist
80
+
81
+ - name : Composer require-checker
82
+ run : vendor/bin/composer-require-checker check
Original file line number Diff line number Diff line change 28
28
"php" : " ^7.3 || ^8.0"
29
29
},
30
30
"require-dev" : {
31
+ "maglnet/composer-require-checker" : " ^2.0 || ^3.0 || ^4.0" ,
31
32
"mheap/phpunit-github-actions-printer" : " ^1.5" ,
32
33
"phpstan/phpstan" : " ^1.0" ,
33
34
"phpstan/phpstan-phpunit" : " ^1.0" ,
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Your \Library ;
6
+
7
+ /**
8
+ * This file exists to:
9
+ * a) Demonstrate the default namespace setup
10
+ * b) Provide something for composer-require-checker to find when CI runs
11
+ * against the actual template repository.
12
+ *
13
+ * You won't want to keep it!
14
+ */
15
+ class Example
16
+ {
17
+ public string $ message ;
18
+
19
+ public function __construct (string $ message )
20
+ {
21
+ $ this ->message = $ message ;
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments