Skip to content

Commit 157ceb1

Browse files
authored
Updating phpstan to 2.0 (#63)
* Updating phpstan to 2.0 * Sign drone.yml * Adding PHP 8.3/8.4 everywhere
1 parent 79257aa commit 157ceb1

File tree

4 files changed

+60
-4
lines changed

4 files changed

+60
-4
lines changed

.drone.jsonnet

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ local pipeline(name, phpversion, params) = {
8080
depends: [ "composer" ],
8181
failure: "ignore",
8282
commands: [
83-
"vendor/bin/phpstan analyse src",
83+
"./vendor/bin/phpstan",
8484
]
8585
},
8686
{
@@ -106,4 +106,6 @@ local pipeline(name, phpversion, params) = {
106106
pipeline("8.1 lowest", "8.1", "--prefer-stable --prefer-lowest"),
107107
pipeline("8.1", "8.1", "--prefer-stable"),
108108
pipeline("8.2", "8.2", "--prefer-stable"),
109+
pipeline("8.3", "8.3", "--prefer-stable"),
110+
pipeline("8.4", "8.4", "--prefer-stable"),
109111
]

.drone.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424
image: joomlaprojects/docker-images:php8.1-ast
2525
name: phan
2626
- commands:
27-
- vendor/bin/phpstan analyse src
27+
- ./vendor/bin/phpstan
2828
depends:
2929
- composer
3030
failure: ignore
@@ -112,7 +112,50 @@ volumes:
112112
path: /tmp/composer-cache
113113
name: composer-cache
114114
---
115+
kind: pipeline
116+
name: PHP 8.3
117+
steps:
118+
- commands:
119+
- php -v
120+
- composer update --prefer-stable
121+
image: joomlaprojects/docker-images:php8.3
122+
name: composer
123+
volumes:
124+
- name: composer-cache
125+
path: /tmp/composer-cache
126+
- commands:
127+
- php -S localhost:8080 -t Tests/stubs &
128+
- vendor/bin/phpunit
129+
failure: ignore
130+
image: joomlaprojects/docker-images:php8.3
131+
name: PHPUnit
132+
volumes:
133+
- host:
134+
path: /tmp/composer-cache
135+
name: composer-cache
136+
---
137+
kind: pipeline
138+
name: PHP 8.4
139+
steps:
140+
- commands:
141+
- php -v
142+
- composer update --prefer-stable
143+
image: joomlaprojects/docker-images:php8.4
144+
name: composer
145+
volumes:
146+
- name: composer-cache
147+
path: /tmp/composer-cache
148+
- commands:
149+
- php -S localhost:8080 -t Tests/stubs &
150+
- vendor/bin/phpunit
151+
image: joomlaprojects/docker-images:php8.4
152+
name: PHPUnit
153+
volumes:
154+
- host:
155+
path: /tmp/composer-cache
156+
name: composer-cache
157+
---
115158
kind: signature
116-
hmac: 22dea03e9152e3df41f95a832d2edb6b6a2ba49720766ded75238d26578e674d
159+
hmac: 48e78d415fd7eb7e041126b820e40933db0285283390f88b3c4b5aab9e972c03
117160

118161
...

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"joomla/test": "^3.0",
1818
"phpunit/phpunit": "^9.5.28",
1919
"squizlabs/php_codesniffer": "^3.7.2",
20-
"phpstan/phpstan": "^1.10.7",
20+
"phpstan/phpstan": "^2.0",
21+
"phpstan/phpstan-deprecation-rules": "^2.0",
2122
"phan/phan": "^5.4.2"
2223
},
2324
"suggest": {

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
includes:
3+
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+
5+
parameters:
6+
level: 5
7+
phpVersion: 80100
8+
reportUnmatchedIgnoredErrors: false
9+
paths:
10+
- src

0 commit comments

Comments
 (0)