Skip to content

Commit ddaf598

Browse files
authored
Merge pull request #10 from php-school/update-starter-kit
Modernise the starter kit
2 parents 6d79956 + 1d43883 commit ddaf598

File tree

4 files changed

+3363
-1155
lines changed

4 files changed

+3363
-1155
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/program.php
44
/solution
55
/exercises/*/solution/vendor
6+
.phpunit.result.cache

composer.json

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
}
1212
],
1313
"require" : {
14-
"php" : ">=5.6",
15-
"php-school/php-workshop": "^2.0"
14+
"php" : ">=7.3",
15+
"php-school/php-workshop": "^3.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "~4.1",
19-
"squizlabs/php_codesniffer": "~2.0",
20-
"composer/composer": "^1.0"
18+
"phpunit/phpunit": "^9",
19+
"squizlabs/php_codesniffer": "^3.5",
20+
"composer/composer": "^2.0",
21+
"phpstan/phpstan": "^0.12.52"
2122
},
2223
"autoload" : {
2324
"psr-4" : {
@@ -31,7 +32,22 @@
3132
"pre-install-cmd": "WorkshopCreator\\Creator::install",
3233
"pre-update-cmd": "WorkshopCreator\\Creator::install",
3334
"post-install-cmd": "WorkshopCreator\\Creator::summary",
34-
"post-update-cmd": "WorkshopCreator\\Creator::summary"
35+
"post-update-cmd": "WorkshopCreator\\Creator::summary",
36+
"test": [
37+
"@unit-tests",
38+
"@cs",
39+
"@static"
40+
],
41+
"unit-tests": "phpunit",
42+
"cs" : [
43+
"phpcs src --standard=PSR12",
44+
"phpcs test --standard=PSR12"
45+
],
46+
"cs-fix" : [
47+
"phpcbf src --standard=PSR12 --encoding=UTF-8",
48+
"phpcbf test --standard=PSR12 --encoding=UTF-8"
49+
],
50+
"static": "phpstan --ansi analyse --level max src"
3551
},
3652
"bin": ["bin/my-workshop"]
3753
}

0 commit comments

Comments
 (0)